Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash installing APKs on API 15-18 emulators #79

Closed
sampalmer opened this issue Jun 8, 2019 · 1 comment
Closed

Crash installing APKs on API 15-18 emulators #79

sampalmer opened this issue Jun 8, 2019 · 1 comment

Comments

@sampalmer
Copy link

sampalmer commented Jun 8, 2019

Describe the bug
Crash installing APKs on API 15-18 emulators

Bundletool version(s) affected
Version: 0.9.0

Stacktrace

C:\Utilities\bundletool>java -jar bundletool-all-0.9.0.jar install-apks --apks=app.apks
The APKs have been extracted in the directory: C:\Users\sam__\AppData\Local\Temp\762967780459134954
[BT:0.9.0] Error: null
java.lang.NullPointerException
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:787)
        at com.google.common.base.Joiner.toString(Joiner.java:454)
        at com.google.common.base.Joiner.appendTo(Joiner.java:106)
        at com.google.common.base.Joiner.appendTo(Joiner.java:154)
        at com.google.common.base.Joiner.join(Joiner.java:197)
        at com.google.common.base.Joiner.join(Joiner.java:187)
        at com.google.common.base.Joiner.join(Joiner.java:205)
        at com.android.ddmlib.Device.installRemotePackage(Device.java:1024)
        at com.android.ddmlib.Device.installPackage(Device.java:902)
        at com.android.ddmlib.Device.installPackage(Device.java:880)
        at com.android.ddmlib.Device.installPackage(Device.java:869)
        at com.android.tools.build.bundletool.device.DdmlibDevice.installApks(DdmlibDevice.java:113)
        at com.android.tools.build.bundletool.device.ApksInstaller.installOnDevice(ApksInstaller.java:94)
        at com.android.tools.build.bundletool.device.ApksInstaller.installApks(ApksInstaller.java:82)
        at com.android.tools.build.bundletool.device.ApksInstaller.installApks(ApksInstaller.java:44)
        at com.android.tools.build.bundletool.commands.InstallApksCommand.execute(InstallApksCommand.java:165)
        at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:88)
        at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:46)

To Reproduce

  1. Ensure no physical devices are connected to the computer
  2. Launch the API 15, API 16, API 17 or API 18 Android emulator
  3. (Due to an unrelated bug, if the emulator screen stays black then you may need to open the emulator's config.ini and switch on both hw.gpu.enabled and hw.gpu.mode)
  4. Run java -jar bundletool-all-0.9.0.jar build-apks --bundle=app.aab --output=apps.apks
  5. Run java -jar bundletool-all-0.9.0.jar install-apks --apks=app.apks

See artifacts.zip

Expected behavior
App should be installed on the emulator

Known workaround
Use the API 29 emulator

@sampalmer sampalmer changed the title Crash installing APKs on API 15 emulator Crash installing APKs on API 15 - 18 emulators Jun 8, 2019
@sampalmer sampalmer changed the title Crash installing APKs on API 15 - 18 emulators Crash installing APKs on API 15-18 emulators Jun 8, 2019
@plecesne
Copy link
Contributor

Dupe of #49.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants