Exporting to specific Android Version

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Fabi1309
:warning: Old Version Published before Godot 3 was released.

Hey Guys,

I created my app now and I want to export it as an apk… Everything works fine except that I can just export it with the latest android version and my phone can’t run the app!

How can I change the Android version so that my phone can run it? In my case it would be 5.0.1!

Greetings Fabi1309

It’s based on android export template and android template supports android 4.0 over.
It can not be determined when export with godot tool.
I can run godot game with my android devices 4.x, 5.x, 6.x.
I don’t know what “can’t run” means.

  • problem with installing on the phone?
  • crash when running on the phone?
  • it runs but just black screen?
  • Any information from adb logcat?
  • Did you make a keystore?

volzhs | 2016-03-24 02:11

@volzhs can’t run means when I want to install it it says: Parse error There was a problem while parsing the package…

Any solutions?

Fabi1309 | 2016-03-24 11:50

:bust_in_silhouette: Reply From: Freeman

How can I change the Android version…?

If I am not mistaken in Java for Android, the android version on which application would run is set in AndroidMinifest.xml file.

Maybe (I am just speculating and have no means to check it now) by setting android:minSDKVersion and android:targetSdkVersion to the right versions of SDK, (maybe along with installing that proper SDK’s and compiling Godot from source) will let you set other android OS version target and minimal version.

The AndroiManifers.xml that is used by Godot can be found in few places (I don’t know which one does what, so I would edit all of them:
./platform/android/java/build/intermediates/manifests/full/debug/AndroidManifest.xml
./platform/android/java/build/intermediates/manifests/full/release/AndroidManifest.xml
./platform/android/java/AndroidManifest.xml
./platform/android/AndroidManifest.xml.template

However I really doubt you have to do any of that!
Your problem most likely lays elsewhere.
Android 5.0.1 should run your properly created game without any problems.
I myself do not have any problems with newest Android 6.0.1.
The only problem with different versions of android I had lately was with Godot 2.0 where my devices with Android 2.3.6 got absolete - but it was done on purpose.

Have you successfully export from Godot to Android ever before?
Have you try to run your game on other android devices, with other android version?
I would rather expect Godot’s android export setting problem on your side than Godot properly done export not working on your device’s android version.

Hey,

first of all thank u for helping me.

I have never exported successfully from Godot to Android.
I don’t have another phone with a different android version…

All in all the error is a parsingerror when I try to install the game on my phone… I googled how I can fix the error and it said that my phone is not compatible with the game version… So I wanna try to change it! But maybe it is NOT the problem… So I will create another thread and describe my problem there. Maybe somebody know what I am doing wrong!

Greetings Fabi1309

Fabi1309 | 2016-03-24 20:38

@Fabi1309

When something like this happens,
try making a super-simple project,
then seeing if that will export + install.

Example: game with just one scene + a simple “Hello World” label

If you still can’t install it, then you don’t have to waste time with the game code ; you know at least one problem is getting Godot to run on that device, regardless of the game.

 

However, if that simple project runs, you can start debugging your full game,
trying to pinpoint where it’s failing / not compatible / needs to be configured.

If you have no clue where it’s failing,
try just adding one part at a time until it breaks
→ then diagnose at /around that point of failure.

 

Good luck!

Grass H0PEr | 2017-09-30 02:03