Comments (7)
Looks like a bug in an old version of ddmlib. We'll update the version to fix the bug properly in bundletool.
A workaround should be to pass the flag --allow-downgrade
to bundletool. Can you try and report if that fixes it for you?
from bundletool.
I was directed here from #79.
I have tried using --allow-downgrade
when installing to an Android emulator running Android 4.0 through 4.4, but I now get a different error:
C:\Users\sam__\Desktop>java -jar C:\Utilities\bundletool\bundletool-all-0.9.0.jar install-apks --apks=64.apks --allow-downgrade
The APKs have been extracted in the directory: C:\Users\sam__\AppData\Local\Temp\5275980875689640840
[BT:0.9.0] Error: Installation of the app failed.
com.android.tools.build.bundletool.model.exceptions.InstallationException: Installation of the app failed.
at com.android.tools.build.bundletool.model.exceptions.InstallationException$Builder.build(InstallationException.java:47)
at com.android.tools.build.bundletool.model.exceptions.InstallationException$Builder.build(InstallationException.java:41)
at com.android.tools.build.bundletool.device.DdmlibDevice.installApks(DdmlibDevice.java:122)
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)
Caused by: com.android.ddmlib.InstallException: Unknown failure (2 [external]: Install on external media)
at com.android.ddmlib.Device.installRemotePackage(Device.java:1031)
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)
... 6 more
from bundletool.
Yeah, this workaround worked perfectly. Can install it with bundletool now. Thanks for the fast reply.
from bundletool.
The same bug at my Android 4.4 device
Bundletool Version:0.9.0
from bundletool.
Now use the flag --allow-downgrade to bundletool , can install apks . Thanks very much.
from bundletool.
I had the same issue with @devjta and then used --allow-downgrade flag and this time had the issue @sampalmer mentioned.
Here is mine:
bundletool install-apks --apks=/Users/figengungor/Desktop/app.apks --allow-downgrade
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/usr/local/Cellar/bundletool/0.10.0/libexec/bundletool-all-0.10.0.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
The APKs have been extracted in the directory: /var/folders/_h/08p9wxj16cn9v50qvx7p07r80000gq/T/13846039056705983555
[BT:0.10.0] Error: Installation of the app failed.
com.android.tools.build.bundletool.model.exceptions.InstallationException: Installation of the app failed.
at com.android.tools.build.bundletool.model.exceptions.InstallationException$Builder.build(InstallationException.java:47)
at com.android.tools.build.bundletool.model.exceptions.InstallationException$Builder.build(InstallationException.java:41)
at com.android.tools.build.bundletool.device.DdmlibDevice.installApks(DdmlibDevice.java:122)
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)
Caused by: com.android.ddmlib.InstallException: Unknown failure (2 [external]: Install on external media)
at com.android.ddmlib.Device.installRemotePackage(Device.java:1031)
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)
... 6 more
I'm able to install to the device with Android version 8.0.0
I'm having the described issue when trying to install to the device with Android version 4.1.2.
Any idea? @plecesne
from bundletool.
Obsolete.
from bundletool.
Related Issues (20)
- Different get-size result between local and server build HOT 1
- Error: Module 'myzip' is missing mandatory file 'manifest/AndroidManifest.xml' HOT 2
- bundletool build-apks failed when minsdk<21 HOT 1
- [BUG] Error: Module 'base' is missing mandatory file 'manifest/AndroidManifest.xml'. HOT 1
- Add bundletool to winget
- The App bundle is not a valid zip file HOT 1
- Unable to sign apk HOT 2
- Unable to sign APK due to FileAlreadyExistsException HOT 5
- com.android.tools.build.bundletool.model.exceptions.InvalidBundleException: Invalid dex file indices, expecting file 'classes?.dex' but found 'classes2.dex'. HOT 2
- Does it make the opposite? HOT 1
- the aab upload to Google Play, size counting issue HOT 1
- Error: Module 'base' is missing mandatory file 'manifest/AndroidManifest.xml'. HOT 2
- How does `bundletool build-apks` generate the versionCode for the APKs? HOT 3
- Returns immediately on command line without any info
- Size differs between bundletool and apkanalyzer.
- Unable to install dynamic feature modules with max sdk in manifest
- Set splittypes
- Please ignore
- Option NOT To Sign The APK Even If Debug Keystore Is Present
- Bundletool Package using 2 versions of AAPT2 Proto
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bundletool.