Problem Parsing The Package

18 views
Skip to first unread message

gunna...@solaramedicalsupplies.com

unread,
Jan 10, 2018, 1:33:30 PM1/10/18
to CodenameOne Discussions
When trying to install a APK onto my phone, I get error "Problem Parsing The Package".
Netbeans 8.1, updated Codename One plugin just a few days ago.
Windows 7 machine.
It's a very simple app, it compiles and runs in the simulator.
I did build a 'key' by right-mouse-click on the project, then select 'Android'. Then clicked 'Generate.
Filled out all the stuff on the Generate Android Key screen.
Clicked Generate and the file was created.
Then made sure this file is selected in the Keystore for the project. Entered a password.
Recompiled project.
Then clicked 'Send Android Build'.
I see the build in my account area.
Set the phone security to allow from anywhere.
Copied the file to the phone.
Tried to execute the APK and got "Problem Parsing The Package".
Any ideas?

Shai Almog

unread,
Jan 11, 2018, 2:04:30 AM1/11/18
to CodenameOne Discussions
These things can happen for multiple reasons. You might already have an app with the same package name installed on the device with a different signature. That can cause problems.

If you look through the logcat/ddms log of the device you should see a more detailed error message when you try the install.

gunna...@solaramedicalsupplies.com

unread,
Apr 23, 2018, 6:45:33 PM4/23/18
to CodenameOne Discussions
Came back to this issue.
Updated to Netbeans 8.2.
New install of Codename One plugin to Netbeans.
Followed all the steps above.

Still have the issue. Sadly, I have not built a Codename One app yet to run on my phone.
Any assistance is appreciated. I would hate to have to give up on Codename One.
But I have to get going on development.

Thanks.

gunna...@solaramedicalsupplies.com

unread,
Apr 23, 2018, 6:57:36 PM4/23/18
to CodenameOne Discussions
Downloaded Android Studio.
Took the APK from Codename One.
Opened it in debugging.

The error Android Studio gives is: Failed to find Android target '23'. Install missing platform and fix project.

That help?



On Wednesday, January 10, 2018 at 11:04:30 PM UTC-8, Shai Almog wrote:

Shai Almog

unread,
Apr 24, 2018, 1:20:16 AM4/24/18
to CodenameOne Discussions
Don't open the APK. Open the device monitor from the IDE it will launch a separate program that lists the output in the console of the device. It's very verbose so clear it out.
Try to reproduce the problem with a clear console and see the output in the console. You don't actually need Android Studio but Google stopped shipping that tool separately.

Thomas

unread,
Apr 24, 2018, 9:51:53 PM4/24/18
to CodenameOne Discussions
The easiest way to install an apk to your phone is to connect it throught USB to your computer and then, in a console (on your computer), do:
`adb install yourapk.apk` (where yourapk.apk if your apk file).
If there is some error because this apk is already installed on your phone (or an apk with the same package name), it will give you an error with an understandable message.

(the error you have in android strudio is because you are missing some android sdk. But you don't need it as you don't want to compile your project here. If the build succeed without error in the cn1 cloud server, there is no reason why your apk couldn't be installed on your device (exept if you have a really old android device running a version of android not supported by cn1. What android version do you have?))

Thomas

unread,
Apr 24, 2018, 9:58:08 PM4/24/18
to CodenameOne Discussions
Actually Google still offers the adb tool as a standalone util (So no need to download the whole Android Studio to have it):  https://www.xda-developers.com/install-adb-windows-macos-linux/
and the `adb logcat` command is all you need to see the android console output
Reply all
Reply to author
Forward
0 new messages