Defold Android build issue: Problem parsing the package
While working on my first hobby gamedev project with Defold, I ran into an issue when trying to install the debug APK on my Android phone:
There was a problem parsing the package.
Searching the Defold forums and the web didn’t produce anything obviously relevant, so I looked at the sample project and tried to figure out what was different in the project settings. Most of the configuration was the same (that is to say, default), so I tried looking at the contents of the APK with unzip -l
. Yes, an APK is just a zipfile that seems to follow JAR conventions.
Inside the APK, I noticed a file named lib/arm64-v8a/libpitch_instinct.so
. But the example project’s APK had lib/arm64-v8a/libColorslidetutorial.so
. Surely it wouldn’t just be that an underscore is verboten there?
That filename is derived from the project title (with spaces and some other chars stripped), defined in the file game.project
. I tried renaming mine from pitch_instinct
to Pitch instinct
and lo and behold, the APK installs on my phone without issue.
Now, I don’t know if it’s literally that library file within the APK that’s the problem — more likely I’d guess that it’s something in one of the 3 different manifest files: AndroidManifest.xml
, assets/game.dmanifest
and META-INF/MANIFEST.MF
.
Hope this might help you in your journeys.