Could not install on android device; parse error

its been a few days and we have not seen our apk compiled with 484, 591 or 605 successfully installed on a android device:

I have asked many friends to test out this dropbox link compiled against the latest version of corona sdk without any success.

anyone on the forum care to give it a shot and let me know if this installs on any device?

http://dl.dropbox.com/u/35273582/Andfunabc.apk.

This has been signed with the debug key and compiled with the latest version 605 of the sdk.

The error we get it "could not parse file". we have tried this on android v2.2

also how do we use the adb command to install it?

one of the stackoverflow articles mentioned these as possible causes:

Name of the package is changed after signing: Use the exact name as the signed package is (instead, adjust the name in Manifest)
Package is compiled against on higher API level: Correct the API level in Manifest file
Package is executed from SD-card: Run (install) the apk -file from phones memory OR use adb command to install it

you can install the app using the following command: "adb install Andfunabc.apk".

There are lots of reasons to get this error:
The shortest one is to check if the orientation you are using is supported on Android.

Hi,

The apk doesn't install on my HTC Desire (it actually reboots the device on running adb install).

BTW I use adb install -r -s yourApp.apk to install from command line, -r to replace if needed, -s to send to sd card since memory is sparse on Desire.

I think we had the same kind of trouble at some point (I hope my memory is not too wrong) and it was, as stated by bruno, related to orientations defined in build.settings : landscape was ok for simulator and iOS but was crashing at install on Android (landscapeRight is the one we use now)

Good luck,

Phil
Moving Player

Hi,

we tried using version 319 to compile the app and the apk correctly installs on samsung galaxy S1 and SII.

it also shows up on a china make android (epad), but with the colors all messed up and runs extremely slow.

the same code compiled with 591 and 605 gives parser error? are we the only ones facing this issue.

here is the build.settings file. have we got the icons wrong ? we dont need the android permissions to be honest? its a simple app.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
settings = {
        orientation =
        {
                default = "Portrait",
        },
         iphone =
        {
                plist =
                {
                        UIPrerenderedIcon = true,
                        UIApplicationExitsOnSuspend = false,
                        CFBundleIconFile = "Icon.png",
                                                CFBundleIconFiles = 
                                                {
                                                   "Icon.png", 
                                                   "Icon@2x.png",
                                                   "Icon-72.png",
                                                },
                },
        },
        android =
        {
                versionCode = "1"
        },
         androidPermissions =
        {
                "android.permission.ACCESS_FINE_LOCATION",
                "android.permission.INTERNET"
        },
}
 
<lua>

Hi,

I wasn't sure (good old memory) when writing this morning, but you might want to try "portrait" without the capital P in build.settings.

That just solved the problem here when using your file ...

Best,

Phil
Moving Player

Thanks Phil. That indeed resolved the issue. I spent 2 weeks on getting this right just because of a lowercase 'p'? grrrrr!

Now i tested this with 591 and it seems to install on a HTC install via the SD card directly. I am about to package this and release it to the market shortly.

views:2082 update:2011/10/7 17:24:19
corona forums © 2003-2011