Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Android builds with Mac does not install on Android devices.
Started by Aidin Jun 01 2013 09:29 AM

- - - - -
74 replies to this topic
[TOPIC CONTROLS]
Page 2 of 3 1 2 3
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#26

Aidin

[GLOBAL: userInfoPane.html]
Aidin
  • Contributor

  • 401 posts
  • Corona SDK

Build 1135 should work with JRE 7. I don't fully understand all the keystore issues that can happen, but I know if you get an older keytool in the path.  You can try to do the command:

 

java -version

 

and see what it says. 

 

Also, humor me and try to and build the hello world sample app and see what happens.

 


Dear Rob,

 

I tried the "java -version" command in Terminal and got this:

 

java version "1.7.0_21"
Java™ SE Runtime Environment (build 1.7.0_21-b12)
Java HotSpot™ 64-Bit Server VM (build 23.21-b01, mixed mode)

I'm gonna try the hello world sample and see how it turns out, as you asked.

 

I tried the sample Hello World and it got installed perfectly, I tried my app but won't install.

 

If there is a problem with my game, so why it works if I build it under Windows?

 

Do I have to downgrade my JRE to 1.6 ?



[TOPIC: post.html]
#27

Aidin

[GLOBAL: userInfoPane.html]
Aidin
  • Contributor

  • 401 posts
  • Corona SDK

Strange, apparently I have had two version of 1.6 and 1.7 because when I went to system library folder, there was a Java 1.6 folder there and I removed with with sudo rm rf but when I type java -version in terminal, it still replies JRE 1.7. I went to my user's library and there was a Java 1.7 folder there!

 

I tried to run simulator but apparently it did not detect that 1.7 and wanted to download a JRE, and it's still downloading, curious to see how it turns out.



[TOPIC: post.html]
#28

Aidin

[GLOBAL: userInfoPane.html]
Aidin
  • Contributor

  • 401 posts
  • Corona SDK

Can it be that I have folders inside my project folder and I read assets from it? I've read somewhere on the site that it can be troublesome on Android but also read otherwise in some other place, maybe that's why?



[TOPIC: post.html]
#29

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,072 posts
  • Enterprise

Folders themselves are not a problem.  Folders with certain names are a problem, but I think it's more of an iOS thing.  What folder names are you using?

 

Are you by any chance building your apk to app folder?  (If you are, dont...)

 

Do you have any files that have different filenames case sensitivity wise between the devices (like .png files that may have gotten renamed to .PNG) when you copied them over?



[TOPIC: post.html]
#30

Aidin

[GLOBAL: userInfoPane.html]
Aidin
  • Contributor

  • 401 posts
  • Corona SDK

Thanks Rob for the reply,

 

Folders themselves are not a problem.  Folders with certain names are a problem, but I think it's more of an iOS thing.  What folder names are you using?

 

Inside my project's root folder are these:

 

docs

juice

sfx

 

and also ".svn" which is hidden.

 

Is path of the project directory has some restrictions like not having spaces in them or whatnot?

 

Are you by any chance building your apk to app folder?  (If you are, dont...)

 

Sorry, I'm not aware of what "app folder" is.

 

Do you have any files that have different filenames case sensitivity wise between the devices (like .png files that may have gotten renamed to .PNG) when you copied them over?

 

Sorry I didn't understand this part.



[TOPIC: post.html]
#31

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,072 posts
  • Enterprise

When you hit the build command in Corona, where does your .apk end up?  Is it by any chance going into the same folder as your main.lua file?

 

The #1 reason why something works in the simulator but not on device is that devices are case-sensitive with regards to file names.  The simulator (on Windows or on the Mac) are not.   So if you do:

 

    someImage = display.newImageRect("myImage.png", someWidth, someHeight)

 

It will load the file if it's name is:   MyImage.png, myimage.png, myImage.PNG, MyImAgE.PnG    in the simulator, but on devices, it has to be an exact match:  only  myImage.png.



[TOPIC: post.html]
#32

derek14

[GLOBAL: userInfoPane.html]
derek14
  • Observer

  • 21 posts
  • Corona SDK

Dear Rob,

 

I'm trying to get to bottom of this, so I attached android debugger with running "adb logcat" and first of all, is there anyway to remove system logs and just log user stuff? It's kinda hard to catch my logs when there are lots of system logs there.

 

Second, I'm not sure if it's all the logs for this but from what I found, I think it's this:

 

///mnt/sdcard/ext_sd/fail_test.apk
V/WindowManager(  243): Finished animation in AppWindowToken{41c06050 token=Token{410c74a0 ActivityRecord{413cac08 com.android.packageinstaller/.InstallAppProgress}}} @ 250359473
W/ActivityManager(  243): No content provider found for permission revoke: file:
///mnt/sdcard/ext_sd/fail_test.apk
W/PackageParser(  243): Exception reading /data/app/vmdl1385892048.tmp
W/PackageParser(  243): java.io.IOException: Entry is not named
W/PackageParser(  243):         at java.util.jar.InitManifest.initEntries(InitManifest.java:60)
W/PackageParser(  243):         at java.util.jar.Manifest.read(Manifest.java:221)
W/PackageParser(  243):         at java.util.jar.Manifest.<init>(Manifest.java:120)
W/PackageParser(  243):         at java.util.jar.JarFile.getManifest(JarFile.java:296)
W/PackageParser(  243):         at android.content.pm.PackageParser.collectCertificates(PackageParser.java:536)
W/PackageParser(  243):         at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:7269)
W/PackageParser(  243):         at com.android.server.pm.PackageManagerService.access$1500(PackageManagerService.java:166)
W/PackageParser(  243):         at com.android.server.pm.PackageManagerService$5.run(PackageManagerService.java:5699)
W/PackageParser(  243):         at android.os.Handler.handleCallback(Handler.java:605)
W/PackageParser(  243):         at android.os.Handler.dispatchMessage(Handler.java:92)
W/PackageParser(  243):         at android.os.Looper.loop(Looper.java:154)
W/PackageParser(  243):         at android.os.HandlerThread.run(HandlerThread.java:60)
D/dalvikvm(  243): GC_EXPLICIT freed 1085K, 40% free 17506K/28707K, paused 4ms+9ms
D/InstallAppProgress( 5130): Installation error code: -105

 

Thanks.

I am getting pretty much the same error messages from adb and identical problems building for android from a mac:

 

W/PackageParser(  339): Exception reading /data/app/vmdl-1517856330.tmp

W/PackageParser(  339): java.io.IOException: Entry is not named

W/PackageParser(  339):     at java.util.jar.InitManifest.initEntries(InitManifest.java:60)

W/PackageParser(  339):     at java.util.jar.Manifest.read(Manifest.java:221)

W/PackageParser(  339):     at java.util.jar.Manifest.<init>(Manifest.java:120)

W/PackageParser(  339):     at java.util.jar.JarFile.getManifest(JarFile.java:296)

W/PackageParser(  339):     at android.content.pm.PackageParser.collectCertificates(PackageParser.java:565)

W/PackageParser(  339):     at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:7751)

W/PackageParser(  339):     at com.android.server.pm.PackageManagerService.access$1500(PackageManagerService.java:175)

W/PackageParser(  339):     at com.android.server.pm.PackageManagerService$6.run(PackageManagerService.java:6275)

W/PackageParser(  339):     at android.os.Handler.handleCallback(Handler.java:605)

W/PackageParser(  339):     at android.os.Handler.dispatchMessage(Handler.java:92)

W/PackageParser(  339):     at android.os.Looper.loop(Looper.java:137)

W/PackageParser(  339):     at android.os.HandlerThread.run(HandlerThread.java:60)

D/PowerManagerService(  339): releaseDVFSLockLocked : all DVFS_MIN_LIMIT are released 

W/ActivityManager(  339): mDVFSLock.release()

D/memalloc(  150): ion: Freeing buffer base:0x42cec000 size:3932160 fd:38

D/memalloc(  150): ion: Unmapping buffer  base:0x42cec000 size:3932160

D/InstallAppProgress( 2976): Installation error code: -105

 

Same project builds perfectly from PC.  The device was a galaxy 7 inch 

 

Version 2013.1143 (2013.6.18)

java version "1.6.0_45"
Java™ SE Runtime Environment (build 1.6.0_45-b06-451-11M4406


[TOPIC: post.html]
#33

Aidin

[GLOBAL: userInfoPane.html]
Aidin
  • Contributor

  • 401 posts
  • Corona SDK

Dear Rob,

 

When you hit the build command in Corona, where does your .apk end up?  Is it by any chance going into the same folder as your main.lua file?

 

No,

 

The #1 reason why something works in the simulator but not on device is that devices are case-sensitive with regards to file names.  The simulator (on Windows or on the Mac) are not.   So if you do:

 

    someImage = display.newImageRect("myImage.png", someWidth, someHeight)

 

It will load the file if it's name is:   MyImage.png, myimage.png, myImage.PNG, MyImAgE.PnG    in the simulator, but on devices, it has to be an exact match:  only  myImage.png.

 

No, all my file names are lower case but they have underscore in them.
 



[TOPIC: post.html]
#34

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,072 posts
  • Enterprise

Just to make sure, you have enough room on the device's internal memory to install the app? (not SD memory)



[TOPIC: post.html]
#35

Aidin

[GLOBAL: userInfoPane.html]
Aidin
  • Contributor

  • 401 posts
  • Corona SDK

I have around 200 MiB on my internal memory.



[TOPIC: post.html]
#36

Aidin

[GLOBAL: userInfoPane.html]
Aidin
  • Contributor

  • 401 posts
  • Corona SDK

[TOPIC: post.html]
#37

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,072 posts
  • Enterprise

If you can install and run Hello World with no problems, then that proves that the build process, including your keys are correct.  Googling your error only brings up a bunch of stuff related to zip.  Are you using any plugins?  Can you free up some space and try it?



[TOPIC: post.html]
#38

Aidin

[GLOBAL: userInfoPane.html]
Aidin
  • Contributor

  • 401 posts
  • Corona SDK

I was fine for a few days but I'm getting the same error again.

 

Wish there was some kind of hash test that we could do or it would be performed automatically to make sure the file is downloaded correctly from the servers.



[TOPIC: post.html]
#39

Aidin

[GLOBAL: userInfoPane.html]
Aidin
  • Contributor

  • 401 posts
  • Corona SDK

If you can install and run Hello World with no problems, then that proves that the build process, including your keys are correct.  Googling your error only brings up a bunch of stuff related to zip.  Are you using any plugins?  Can you free up some space and try it?

 

No I'm not using any plugins.



[TOPIC: post.html]
#40

Aidin

[GLOBAL: userInfoPane.html]
Aidin
  • Contributor

  • 401 posts
  • Corona SDK

If my zip files are corrupted, why when I rename APK to ZIP, I can uncompress them without problems?

 

What is this error -105 and "Entry is not named" error related to my problem, my google searches are not futile.



[TOPIC: post.html]
#41

Aidin

[GLOBAL: userInfoPane.html]
Aidin
  • Contributor

  • 401 posts
  • Corona SDK

1- Since my game crashes on installation, does it can still be related to file names casing and other things we suspected before?

 

2- If my Internet connection is bad, why iOS builds, almost, always work without problem?

 

3- Why simulator only uploads a few kilobytes rather than my whole project which is around 15MiB to build server? Would it be related to the problem?

 

I'm downloading adt for Mac, it will take about a day to download so that might help but let me know if you want me to do any check from Windows with ADT.



[TOPIC: post.html]
#42

Aidin

[GLOBAL: userInfoPane.html]
Aidin
  • Contributor

  • 401 posts
  • Corona SDK

BTW, do you know how I can run the adb logcat in OS X? I'm new to OS X and have no idea how to pass parameter adb.



[TOPIC: post.html]
#43

ksan

[GLOBAL: userInfoPane.html]
ksan
  • Corona Geek

  • 2,795 posts
  • Corona SDK

adb needs to be in system path. Google how to do this if you wish. Then you open the Terminal and just type the adb + parameter commands there.



[TOPIC: post.html]
#44

seanh

[GLOBAL: userInfoPane.html]
seanh
  • Plumber

  • 263 posts
  • Corona Staff

3- Why simulator only uploads a few kilobytes rather than my whole project which is around 15MiB to build server? Would it be related to the problem?

The simulator only uploads the lua butecode from the app, not all of the assets etc.

[TOPIC: post.html]
#45

Aidin

[GLOBAL: userInfoPane.html]
Aidin
  • Contributor

  • 401 posts
  • Corona SDK

I used my Windows machine to get the build the exact same project and it installs fine.

 

Any idea what can be the problem on Mac?



[TOPIC: post.html]
#46

Aidin

[GLOBAL: userInfoPane.html]
Aidin
  • Contributor

  • 401 posts
  • Corona SDK

I'm willing to upload both APK files to a Corona engineer if might help solving this, or any other way that I can help.

 

I think JRE is important on making Android builds, which I donno why because I believe actual build is done on Corona servers, but on my Mac it's 1.6.

 

Hope we can get to bottom of this.



[TOPIC: post.html]
#47

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,072 posts
  • Enterprise

Only part of the build is done on our servers.  The making of the .APK file, the signing of the app with the keystore, and the initial conversion of the Lua to bytecode happens on your computer.   You have to have a properly working Java JDK/JRE installed as well has have the appropriate tools like jarsigner available and in your path.

 

This is very likely a problem with your Java setup.

 

Have you been able to view the console log and look for errors yet?



[TOPIC: post.html]
#48

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,072 posts
  • Enterprise

One last thing before I ask the engineers.   Earlier I asked you to build the Hello World sample app and try that.  I did not see any thing from you if that worked or not.

 

Please try to build and install the hello world app.

 

Thanks

Rob



[TOPIC: post.html]
#49

Aidin

[GLOBAL: userInfoPane.html]
Aidin
  • Contributor

  • 401 posts
  • Corona SDK

Sorry for the LONG delay. I got to manage to get back to this again, finally.

 

I did build the hello world sample and it did indeed install OK but still my builds are not getting installed. I tried to install via adb install command and got this from OS X's Terminal:

 

Failure [INSTALL_PARSE_FAILED_CERTIFICATE_ENCODING]

 

and logcat logged this while I was installing:

 

D/AndroidRuntime(29160): 
D/AndroidRuntime(29160): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime(29160): CheckJNI is OFF
D/AndroidRuntime(29160): Calling main entry com.android.commands.pm.Pm
W/ActivityManager(  238): No content provider found for permission revoke: file:///data/local/tmp/SuperHungryMonsters.apk
W/ActivityManager(  238): No content provider found for permission revoke: file:///data/local/tmp/SuperHungryMonsters.apk
W/PackageParser(  238): Exception reading /data/app/vmdl669478898.tmp
W/PackageParser(  238): java.io.IOException: Entry is not named
W/PackageParser(  238): 	at java.util.jar.InitManifest.initEntries(InitManifest.java:60)
W/PackageParser(  238): 	at java.util.jar.Manifest.read(Manifest.java:221)
W/PackageParser(  238): 	at java.util.jar.Manifest.<init>(Manifest.java:120)
W/PackageParser(  238): 	at java.util.jar.JarFile.getManifest(JarFile.java:296)
W/PackageParser(  238): 	at android.content.pm.PackageParser.collectCertificates(PackageParser.java:536)
W/PackageParser(  238): 	at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:7269)
W/PackageParser(  238): 	at com.android.server.pm.PackageManagerService.access$1500(PackageManagerService.java:166)
W/PackageParser(  238): 	at com.android.server.pm.PackageManagerService$5.run(PackageManagerService.java:5699)
W/PackageParser(  238): 	at android.os.Handler.handleCallback(Handler.java:605)
W/PackageParser(  238): 	at android.os.Handler.dispatchMessage(Handler.java:92)
W/PackageParser(  238): 	at android.os.Looper.loop(Looper.java:154)
W/PackageParser(  238): 	at android.os.HandlerThread.run(HandlerThread.java:60)
D/dalvikvm(  238): GC_EXPLICIT freed 700K, 47% free 16664K/31395K, paused 12ms+10ms
D/AndroidRuntime(29160): Shutting down VM
D/dalvikvm(29160): GC_CONCURRENT freed 136K, 42% free 593K/1024K, paused 0ms+0ms
I/AndroidRuntime(29160): NOTE: attach of thread 'Binder Thread #3' failed
W/ThrottleService(  238): unable to find stats for iface rmnet0

My Java is 1.6. When I run the java -version command in Terminal it returns this:

 

java version "1.6.0_51"
Java™ SE Runtime Environment (build 1.6.0_51-b11-457-11M4509)
Java HotSpot™ 64-Bit Server VM (build 20.51-b01-457, mixed mode)

I don't think it be my Java because I did an Android build with Unity recently and I assume it uses my JRE as well.

 

What can I do to fix this finally?

 

Thanks.



[TOPIC: post.html]
#50

Aidin

[GLOBAL: userInfoPane.html]
Aidin
  • Contributor

  • 401 posts
  • Corona SDK

and here is my Android build dialogue box:

 

Screen_Shot_2013_11_18_at_10_24_21_PM.pn




[topic_controls]
Page 2 of 3 1 2 3
 
[/topic_controls]