问题
I want to start publish my app as AAB. I successfully build my build.aab file and decide to try install app on my phone. I use next way
1) Build APK set from aab file with command:
java -jar bundletool.jar build-apks
--bundle=*path to aab*
--output=*path to apks*
--connected-device
--ks=*android debug keystore path*
--ks-key-alias=androiddebugkey
--adb=*path to adb*
2) Install with next command:
java -jar bundletool.jar install-apks
--apks=*path to apks*
--adb=*path to adb*
App is successfully installed, but when I launch it I see only white screen. It reproduces on all devices.
When I use --universal
instead of --connected-device
all works good.
I also try to publish test version of my app. It is successfully downloaded and installed, but crash on the start without any errors. In LogCat I detect next suspicious logs:
[12-09 16:56:26.324 754:754 E/ANDR-IOP]
IOP HAL: Received pkg_name = com.sampleApp.android.vsm.dji pid = -1
[12-09 16:56:26.895 8110:8110 I/zygote64]
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path:
DexPathList[[zip file "/system/framework/com.android.future.usb.accessory.jar", zip file
"/data/app/com.sampleApp.android.vsm.dji-ToIZw7tZAA9jyANJ4k4SQA==/base.apk", zip file
"/data/app/com.sampleApp.android.vsm.dji-ToIZw7tZAA9jyANJ4k4SQA==/split_config.arm64_v8a.apk", zip file
"/data/app/com.sampleApp.android.vsm.dji-ToIZw7tZAA9jyANJ4k4SQA==/split_config.ru.apk", zip file
"/data/app/com.sampleApp.android.vsm.dji-ToIZw7tZAA9jyANJ4k4SQA==/split_config.xxhdpi.apk", dex file "InMemoryDexFile[cookie=[0,
491834627968]]", dex file "InMemoryDexFile[cookie=[0,
491834628128]]"],nativeLibraryDirectories=[/data/app/com.sampleApp.android.vsm.dji-ToIZw7tZAA9jyANJ4k4SQA==/lib/arm64,
/data/app/com.sampleApp.android.vsm.dji-ToIZw7tZAA9jyANJ4k4SQA==/base.apk!/lib/arm64-v8a,
/data/app/com.sampleApp.android.vsm.dji-ToIZw7tZAA9jyANJ4k4SQA==/split_config.arm64_v8a.apk!/lib/arm64-v8a,
/data/app/com.sampleApp.android.vsm.dji-ToIZw7tZAA9jyANJ4k4SQA==/sp
回答1:
As it turn out some of libraries, that I use, don't support AAB build.
Make sure that all dependencies that you use support AAB build so as not to repeat my mistakes and to save ton of time.
来源:https://stackoverflow.com/questions/59211752/why-my-android-app-does-not-work-when-i-build-it-as-android-app-bundle