My exported my APK can't be installed on Android device

tecbugtecbug Posts: 3Member
edited January 2017 in General Chat

Hi,
I exported APK from Godot and sent it to my Android devices. I can't install it on neither:
Phone (Android 6.0) says: "Parse error. There was a problem parsing the package."
Tablet (Android 4.2.2) says: "App not installed".

Tried with 3 builds - always the same errors.

Tagged:

Tags :

Answers

  • TwistedTwiglegTwistedTwigleg Posts: 380Moderator

    Did you build with the export templates for Godot 2.1.1?

    On IOS there are export issues for the official export templates. I would try exporting with the Godot 2.1.0 templates if you are using the 2.1.1 templates and see if that fixes it.

  • tecbugtecbug Posts: 3Member

    I've tried both
    - Godot_v2.1.1-stable_export_templates.tpz
    - Godot_v2.1-stable_export_templates.tpz

    Effect is the same

  • TwistedTwiglegTwistedTwigleg Posts: 380Moderator

    Hey tecbug.

    Does it work in the android emulator?
    Do you have your SDK and JDK paths setup?
    Do you have a debug.keystore set?

    (Not sure if it will help, but who knows?) Have you download the SDK for Android 6.0 and/or 4.2.2?

    Not sure if this is possible, can you get a crash log from the device?

    Other than that, I'm not sure. I'll admit I haven't done a whole lot in Android! :smile:

  • DuanegDuaneg Posts: 11Member
    edited February 6

    I'm getting the same issue with Godot 3.0., and I have the SDK, JDK, and debug.keystore paths set. Exporting seems to work fine, it just won't install on the phone.

  • TwistedTwiglegTwistedTwigleg Posts: 380Moderator

    Even a year later, I still know very little about Android, so I'm not sure on how much help I can provide. That said, here's what I suggest trying:

    | Try launching the app on the android emulator. I'd suggest using a newer version of Android in the emulator just to be sure that the Android version isn't the problem.
    |
    | I'd try to see if there is any error message(s). Whether it be from the phone, or from Godot? If you can find an error message, it may give some insight into what is causing the problem.
    |
    | Are you installing the app from the Godot editor? Maybe try installing the APK directly and see if that works? This Stackoverflow post shows it's possible to install the APK from a computer, so maybe see if something like that works? (One way I found that worked decently when I had an Android tablet was to send myself an email with the APK, download it through a mail app, and then install it through a file browser app)
    |
    | Check to make sure your phone supports OpenGLES 3 (I think that's what Godot uses on mobile). I doubt this is the issue, but it is possible.
    |
    | Certain GPUs on android do not work with 3D nodes. See this issue for details. Once again, I doubt this is the issue.

    I'm not sure if any of the above is helpful, but that's what I would try if I was in your position. Hopefully someone with more experience in Android can help.

  • DuanegDuaneg Posts: 11Member

    Thanks for your input. It was helpful in troubleshooting. I just tried exporting a the 2D Platformer official demo for 3.0 and it worked really well. This leads me to believe that the Android export is picky about how scenes and scripts are composed. Maybe there are certain nodes that need to be present, or cause conflicts. I tried a few other demos that also worked. I will need to study the demos to see what is going on.

    Can you tell me what emulators work the best? I haven't been able to get the Android Studio emulator to work. I also tried Nox and Andy, but the .apk would not install, even though it installs fine on my Samsung phone.

  • CalinouCalinou Posts: 120Admin Godot Developer
    edited February 7

    Can you tell me what emulators work the best? I haven't been able to get the Android Studio emulator to work. I also tried Nox and Andy, but the .apk would not install, even though it installs fine on my Samsung phone.

    You would need an emulator that supports hardware OpenGL ES 3.0 acceleration. I don't know if there is any emulator that supports this; I just checked the official emulator and it's stuck at OpenGL ES 2.0.

  • TwistedTwiglegTwistedTwigleg Posts: 380Moderator

    @Calinou said:

    Can you tell me what emulators work the best? I haven't been able to get the Android Studio emulator to work. I also tried Nox and Andy, but the .apk would not install, even though it installs fine on my Samsung phone.

    You would need an emulator that supports hardware OpenGL ES 3.0 acceleration. I don't know if there is any emulator that supports this; I just checked the official emulator and it's stuck at OpenGL ES 2.0.

    I totally forgot to check the OpenGL ES acceleration, whoops! I have no idea on other android emulators other than the official emulator, so I'd say emulators are out (unless there is one that works with OpenGL ES 3.0)

    According to Khronos.org, Android Studio 3.0 has OpenGL ES 3.0 support... I'm not sure it will work with Godot though, and given the platformer2D demo works on your phone, I'm not sure there is any reason to test with a emulator since we can confirm it is not your phone's Android version that is the problem.


    Does your project use 3D nodes? I'd check to see if the 3D platformer demo works, as it'd be a good test. If the 3D nodes do not work then it may be due to this issue.

    If you're only using 2D nodes (or Control nodes) then I'd slowly start reconstructing your project a little at a time and test every so often. It is more time consuming, but at least then you know what node/script is the culprit.

    Other than that, I really don't have any other suggestions, sorry! I really know very little about Android and I've more or less reached the limit of my Android knowledge :cold_sweat: (I only used Android for a year. I only really tried making Android apps for under 3 months of that time).

    I hope you find a solution to your problem!

  • DuanegDuaneg Posts: 11Member

    Thanks for the feedback. I did not know about the OpenGL ES 3.0 requirement. I was only asking about an emulator so I can check out my apps a little quicker than loading them on the phone every time. I am confident that with a little time I will figure out what is causing the issue. ... All the best!

  • DuanegDuaneg Posts: 11Member
    edited February 11

    I finally got it to work. I had a folder in the Godot project folder called "Builds", which I was using for my exported projects. After removing that folder, and exporting to a folder outside of my project folder, the apk installed successfully on my phone.

    Also, I got the Android Studio emulator to work. It turns out that Godot can export projects that do not require Open GL ES 3.0. You need to select x86 and/ x86 64 under Architectures in the export options. Also, when the emulator is running in the background, there is an Android button next to the play scene button in Godot that allows you to preview the project with one click.

  • Shin-NiLShin-NiL Posts: 137Moderator

    It still requiring OpenGL ES 3.0, what's happening here is that your emulator is only compatible with x86 architeture.

  • DuanegDuaneg Posts: 11Member

    Okay, that makes sense. Thanks for the explanation.

Sign In or Register to comment.