Image for post
Image for post

Appcelerator Google Play Store: APK error could not parse error string

When building an APK for the Google Play Store through the Appcelerator CLI, the APK will build correctly but it won’t install on certain devices e.g. AVD emulators or physical Android devices.

When attempting an APK install you get error like so:

Error: Could not parse error string

If you have tracing/debugging enabled you might always see the following which provides the first clue:

INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries

This indicates that the APK has not been built for all architectures. When you trigger the build command:

appc run -p android -T dist-playstore

Take note of which architectures are being included at the start of the build log:

[INFO] Building for the following architectures: arm64-v8a, armeabi-v7a

In this case, the architecture that is missing is x86. Also when running to the an emulator (rather than Google Play Store distribution) you’ll notice that the x86 architecture is being included which is why you don’t notice the issue until it this point.

Not sure if this is a bug or not? It is noted in the following issue: TIMOB-26548 which provides a solution — add the list of ABIs to tiapp.xml just after the <android> section and before anything else:

<android xmlns:android="http://schemas.android.com/apk/res/android">
<abi>armeabi-v7a,arm64-v8a,x86</abi>

Once you do this, you should see the full list of architectures when you run a CLI build:

[INFO] Building for the following architectures: arm64-v8a, armeabi-v7a, x86

Written by

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store