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

NullPointerException of install-apks #372

Open
zmbcen opened this issue Aug 16, 2024 · 0 comments
Open

NullPointerException of install-apks #372

zmbcen opened this issue Aug 16, 2024 · 0 comments

Comments

@zmbcen
Copy link

zmbcen commented Aug 16, 2024

I'm having issues installing apks with bundletool, where I'm getting a NullPointerException when the file is known to exist.

zhoumubaicen@zmbcendeMBP zmbcen % java -jar bundletool-all-1.17.1.jar install-apks --apks=/Users/zhoumubaicen/Desktop/xiaoduAccess/deviceAccess/QingHe-xps06e/google_file_1.4237.652465286.1-release.apks

[BT:1.17.1] Error: null
java.lang.NullPointerException
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:903)
        at com.google.common.io.ByteStreams.toByteArray(ByteStreams.java:238)
        at com.google.common.io.ByteSource.read(ByteSource.java:300)
        at com.android.tools.build.bundletool.model.utils.ResultUtils.readTableOfContentFromApksArchive(ResultUtils.java:70)
        at com.android.tools.build.bundletool.model.utils.ResultUtils.readTableOfContents(ResultUtils.java:55)
        at com.android.tools.build.bundletool.commands.InstallApksCommand.readBuildApksResult(InstallApksCommand.java:388)
        at com.android.tools.build.bundletool.commands.InstallApksCommand.execute(InstallApksCommand.java:195)
        at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:117)
        at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:55)

I tried using java11, 17 and 22, and the above error occurred。

On the other hand, I used a third-party apks installer to install the apks, and the apks were installed correctly, which shows that there is no problem with my apks. But this problem occurred when I used bundletool, which is also what puzzled me.

The apks is "Files By Google [v1.4237.652465286.1-release"]
https://play.google.com/store/apps/details?id=com.google.android.apps.nbu.files&hl=zh

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

1 participant