Problem on game distribution

A project to port LÖVE to Android handhelds
User avatar
alberto_lara
Party member
Posts: 372
Joined: Wed Oct 30, 2013 8:59 pm

Problem on game distribution

Post by alberto_lara »

Hello guys, it turns that I'm trying to publish my game on google play now, the thing is that I'm having problems building my release apk now, I'm putting the same msg I sent to google support here:

"Hey! hello again,

I'm afraid I'm having a little problem again, I know this is not the correct department so if you could please forward this message I'd be glad.

The thing is that I need to build an apk with "ant release" now (I've been using "ant debug") and I'm having problems with it, I followed the instructions here: http://developer.android.com/tools/publ ... gning.html (on Signing your app manually) but I have a question on this step:

Align the final APK package using zipalign.
$ zipalign -v 4 your_project_name-unaligned.apk your_project_name.apk

I don't see any "unaligned" apk on the bin folder after doing the "ant release" and/or the "jarsigner", the list of files I get is this:

classes/ classes.dex.d
dexedLibs/ love_android_sdl2.ap_
res/ love_android_sdl2.ap_.d
AndroidManifest.xml love_android_sdl2-release-unsigned.apk
AndroidManifest.xml.d love_android_sdl2-release-unsigned.apk.d
build.prop proguard.txt
classes.dex

Could you please tell me on what apk should I focus? there's any tip?

I'm attaching the terminal log which shows what I'm doing, the most strange thing is that I'm able to install the final wyb_lite.apk file, but when I try to open it on my phone it crashes, the "unfortunatelly, the app has stopped" msg.

A little help here please! I work on support for a company too and I recognize your awesome work :)

Cheers,
Gustavo."

the terminal output is this:

Code: Select all

[g@gus bin]$ ~/jdk1.8.0_05/bin/jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore key.keystore love_android_sdl2-release-unsigned.apk tavo
Enter Passphrase for keystore: 
   adding: META-INF/MANIFEST.MF
   adding: META-INF/TAVO.SF
   adding: META-INF/TAVO.RSA
  signing: assets/game.love
  signing: AndroidManifest.xml
  signing: resources.arsc
  signing: res/drawable-hdpi/ic_launcher.png
  signing: res/drawable-mdpi/ic_launcher.png
  signing: res/drawable-xhdpi/ic_launcher.png
  signing: res/drawable-xxhdpi/ic_launcher.png
  signing: classes.dex
  signing: org/libsdl/app/old._ja
  signing: lib/armeabi/libopenal.so
  signing: lib/armeabi/libmpg123.so
  signing: lib/armeabi/libgnustl_shared.so
  signing: lib/armeabi/liblove.so
  signing: lib/armeabi/libdevil.so
  signing: lib/armeabi-v7a/libopenal.so
  signing: lib/armeabi-v7a/libmpg123.so
  signing: lib/armeabi-v7a/libgnustl_shared.so
  signing: lib/armeabi-v7a/liblove.so
  signing: lib/armeabi-v7a/libdevil.so
jar signed.

Warning: 
No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2041-12-28) or after any future revocation date.
[g@gus bin]$ zipalign -v 4 love_android_sdl2-release-unsigned.apk wyb_lite.apk
Verifying alignment of wyb_lite.apk (4)...
      50 META-INF/MANIFEST.MF (OK - compressed)
     836 META-INF/TAVO.SF (OK - compressed)
    1688 META-INF/TAVO.RSA (OK - compressed)
    2844 assets/game.love (OK)
 6183492 AndroidManifest.xml (OK - compressed)
 6184980 resources.arsc (OK)
 6185976 res/drawable-hdpi/ic_launcher.png (OK)
 6191680 res/drawable-mdpi/ic_launcher.png (OK)
 6194232 res/drawable-xhdpi/ic_launcher.png (OK)
 6202516 res/drawable-xxhdpi/ic_launcher.png (OK)
 6217297 classes.dex (OK - compressed)
 6232427 org/libsdl/app/old._ja (OK - compressed)
 6241716 lib/armeabi/libopenal.so (OK - compressed)
 6419381 lib/armeabi/libmpg123.so (OK - compressed)
 6492731 lib/armeabi/libgnustl_shared.so (OK - compressed)
 6739320 lib/armeabi/liblove.so (OK - compressed)
 8338541 lib/armeabi/libdevil.so (OK - compressed)
 9031482 lib/armeabi-v7a/libopenal.so (OK - compressed)
 9200506 lib/armeabi-v7a/libmpg123.so (OK - compressed)
 9264232 lib/armeabi-v7a/libgnustl_shared.so (OK - compressed)
 9508315 lib/armeabi-v7a/liblove.so (OK - compressed)
11028853 lib/armeabi-v7a/libdevil.so (OK - compressed)
Verification succesful
[g@gus bin]$ adb install wyb_lite.apk 
5389 KB/s (11671537 bytes in 2.114s)
  pkg: /data/local/tmp/wyb_lite.apk
Success
Maybe I'm doing something wrong, I don't know. Any help here would be appreciated, thanks!
Last edited by alberto_lara on Wed Aug 13, 2014 8:20 pm, edited 1 time in total.
User avatar
alberto_lara
Party member
Posts: 372
Joined: Wed Oct 30, 2013 8:59 pm

Re: Problem on publishing game

Post by alberto_lara »

I found this, do you think this can be important? https://www.scirra.com/tutorials/861/ho ... id-app-apk

"*JDK 6 (Download: 64-bit/32-bit ; If neither of those work for you, take your pick here. You could probably use a more recent version, such as JDK 6u45, as long as it's not JDK 7. Google Play Store doesn't play well with JDK 7, and the easiest thing to do right now is keep true with JDK 6.)"

I'm trying.
User avatar
master both
Party member
Posts: 262
Joined: Tue Nov 08, 2011 12:39 am
Location: Chile

Re: Problem on publishing game

Post by master both »

Hey, What exactly is your problem? I had a problem where "ant release" didn't work exactly as I wanted, so what I did was to use "ant debug" with this flag in the AndroidManifest.xml "<application android:debuggable="false" [...]>" and then unsign the apk debug key with "zip -d yourapp.apk 'META-INF*' ". Maybe this method can solve your problem.
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Problem on publishing game

Post by Davidobot »

It's easier if you edit ant.properties and put the keystore location and keystore alias in it.
Then run ant release, it will request 2 passwords and automatically align and sign your apk.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
alberto_lara
Party member
Posts: 372
Joined: Wed Oct 30, 2013 8:59 pm

Re: Problem on publishing game

Post by alberto_lara »

Thanks guys, I'll try that out :)

EDIT: Unfortunatelly the ant.properties thing did not work, I even followed the official docs here: http://developer.android.com/tools/buil ... dline.html

The strange thing is that apparently it works pretty well, I do the "ant release", put the passwords and get the <my project>-release.apk file. I also can install it with no problems, the issue is to the end, when I try to open it, it just crashes and shows the "unfortunatelly the app has stopped" msg.

I'm wondering about this: "JDK 6 (Download: 64-bit/32-bit ; If neither of those work for you, take your pick here. You could probably use a more recent version, such as JDK 6u45, as long as it's not JDK 7. Google Play Store doesn't play well with JDK 7, and the easiest thing to do right now is keep true with JDK 6.)" on this page: https://www.scirra.com/tutorials/861/ho ... id-app-apk
I'll try with a different version of the java tools and if necessary the Manifest file thing.

EDIT 2: Generating the key with Java 6 does not work.

EDIT 3: The Manifest file solution did not work, I get the "Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]" when trying to install the debug apk with the META-INF* files deleted :( I'm running out of ideas for this.
User avatar
master both
Party member
Posts: 262
Joined: Tue Nov 08, 2011 12:39 am
Location: Chile

Re: Problem on game distribution

Post by master both »

Looks like this bug is your problem, try using the latest version of the repo.
User avatar
alberto_lara
Party member
Posts: 372
Joined: Wed Oct 30, 2013 8:59 pm

Re: Problem on game distribution

Post by alberto_lara »

Same issue after using the last version of the repository :( I even updated NDK to the latest version.

EDIT: Wait, looks like something else is wrong.. I can't even open a normal debug-apk on my phone.. I'm gonna check that.

EDIT 2: I don't really know what's happening now.
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Problem on game distribution

Post by Davidobot »

alberto_lara wrote:Same issue after using the last version of the repository :( I even updated NDK to the latest version.

EDIT: Wait, looks like something else is wrong.. I can't even open a normal debug-apk on my phone.. I'm gonna check that.

EDIT 2: I don't really know what's happening now.
Right, make sure you ran ndk-build before building. Also make sure that if you are using a custom GameActivity file, it is under the src folder in the repo and not in the direct root. Also, make sure you have all the correct files from the android SDK.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
alberto_lara
Party member
Posts: 372
Joined: Wed Oct 30, 2013 8:59 pm

Re: Problem on game distribution

Post by alberto_lara »

Good news! (I have one last problem) I see now this problem was happening because I was changing the <manifest package="org.love2d.android" to:
<manifest package="org.love2d.android.wyb" on the Manifest File (I changed the folder tructure on 'src' folder too).

Now that I set up everything from scratch and do not change that string and folder, I can install the debug apk and also create and run the release apk (signed and with everything ready) on my phone! The problem is that I can't upload the apk to google play because the "org.love2d.android" ID is already registered, so my question would be what do I need to change apart from this: manifest package="org.love2d.android"
and the folder structure on 'src'?

Thanks!
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Problem on game distribution

Post by Davidobot »

alberto_lara wrote:Good news! (I have one last problem) I see now this problem was happening because I was changing the <manifest package="org.love2d.android" to:
<manifest package="org.love2d.android.wyb" on the Manifest File (I changed the folder tructure on 'src' folder too).

Now that I set up everything from scratch and do not change that string and folder, I can install the debug apk and also create and run the release apk (signed and with everything ready) on my phone! The problem is that I can't upload the apk to google play because the "org.love2d.android" ID is already registered, so my question would be what do I need to change apart from this: manifest package="org.love2d.android"
and the folder structure on 'src'?

Thanks!
Then inside change "org.love2d.android" to anything, such as "com.albertoLara.awesomeGame". Then in your manifest rename "GameActivity" to, for example "AwesomeGameActivity". After that, inside the src folder, create a folder called "com", inside that, a folder called "albertoLara" and finally inside that, a folder called "awesomeGame". The folder structure is something like this by now: "src/com/albertoLara/awesomeGame/" Create a .java file called AwesomeGameActivity.java and put this inside:

Code: Select all

package com.albertoLara.awesomeGame;
import org.love2d.android.GameActivity;

public class AwesomeGameActivity extends GameActivity {}
For more info, check out Game Packaging.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
Locked

Who is online

Users browsing this forum: No registered users and 6 guests