Fixed
Status Update
Comments
je...@google.com <je...@google.com> #2
Adding "api 'com.android.support:multidex:1.0.2'" to the application module fixes the issue. But adding "implementation 'com.android.support:multidex:1.0.2'" doesn't.
[Deleted User] <[Deleted User]> #3
Can you please share your build.gradle files (for application and android library), as I am unable to reproduce?
From the screenshot, classes8.dex contains only references to the MultiDexApplication, it does not contain definitions of the class. If you execute `dexdump <path_to_apk>` are you able to see the definition of MultiDexApplication?
From the screenshot, classes8.dex contains only references to the MultiDexApplication, it does not contain definitions of the class. If you execute `dexdump <path_to_apk>` are you able to see the definition of MultiDexApplication?
je...@google.com <je...@google.com> #5
The difference when building from Studio is that we take into consideration the API of the device you are deploying to, so we might change legacy multidex build to a native multidex one. It looks like the device you are deploying to has API 25, so that is why APK differs when building from the command line and when building from the IDE. In legacy multidex we have requirements due to DalvikVM which classes are in the main dex, and that's why MultiDexApplication is in the classes.dex. However, for native multidex, ART is able to load classes from any classes<N>.dex file. So it is strange that the runtime is unable to find MultiDexApplication, when it's clearly in classes13.dex.
What is the device that you are trying to deploy the app to? From the screenshots it looks like it's a Chromebook?
What is the device that you are trying to deploy the app to? From the screenshots it looks like it's a Chromebook?
[Deleted User] <[Deleted User]> #6
I tested if the Chromebook was the issue by trying the same on the Nexus 6P running Oreo. And the Nexus 6P has the same issue.
The logcat says:
09-06 11:33:09.672 10942-10942/? E/dex2oat: Failed to open dex file from oat file. File: base.apk:classes8.dex Error: Failure to verify dex file 'base.apk:classes8.dex': Non-zero padding 65 before section start at ace
09-06 11:33:09.678 20659-10988/? I/CheckinUtil: Classify the device as Phone.
09-06 11:33:09.686 10942-10942/? I/dex2oat: dex2oat took 754.758ms (472.528ms cpu) (threads: 4)
09-06 11:33:09.693 581-23895/? E/installed: DexInv: --- END '/data/app/vmdl1021122682.tmp/base.apk' --- status=0x0100, process failed
09-06 11:33:09.694 581-23895/? E/installd: Failed to dexopt (256)
09-06 11:33:09.695 795-829/? W/PackageManager.DexOptimizer: Failed to dexopt
com.android.server.pm.Installer$InstallerException: android.os.ServiceSpecificException: Failed to dexopt (code 256)
at com.android.server.pm.Installer.dexopt(Installer.java:290)
at com.android.server.pm.PackageDexOptimizer.dexOptPath(PackageDexOptimizer.java:220)
at com.android.server.pm.PackageDexOptimizer.performDexOptLI(PackageDexOptimizer.java:175)
at com.android.server.pm.PackageDexOptimizer.performDexOpt(PackageDexOptimizer.java:123)
at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:18185)
at com.android.server.pm.PackageManagerService.installPackageTracedLI(PackageManagerService.java:17780)
at com.android.server.pm.PackageManagerService.-wrap33(Unknown Source:0)
at com.android.server.pm.PackageManagerService$6.run(PackageManagerService.java:15251)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
09-06 11:33:09.701 795-810/? I/ActivityManager: Force stopping com.visiolink.reader.wrapper appid=10264 user=-1: installPackageLI
See the attached file for the complete logcat.
I think it might be a 3. party library causing the issue. I will try to remove it and see what happens.
The logcat says:
09-06 11:33:09.672 10942-10942/? E/dex2oat: Failed to open dex file from oat file. File: base.apk:classes8.dex Error: Failure to verify dex file 'base.apk:classes8.dex': Non-zero padding 65 before section start at ace
09-06 11:33:09.678 20659-10988/? I/CheckinUtil: Classify the device as Phone.
09-06 11:33:09.686 10942-10942/? I/dex2oat: dex2oat took 754.758ms (472.528ms cpu) (threads: 4)
09-06 11:33:09.693 581-23895/? E/installed: DexInv: --- END '/data/app/vmdl1021122682.tmp/base.apk' --- status=0x0100, process failed
09-06 11:33:09.694 581-23895/? E/installd: Failed to dexopt (256)
09-06 11:33:09.695 795-829/? W/PackageManager.DexOptimizer: Failed to dexopt
com.android.server.pm.Installer$InstallerException: android.os.ServiceSpecificException: Failed to dexopt (code 256)
at com.android.server.pm.Installer.dexopt(Installer.java:290)
at com.android.server.pm.PackageDexOptimizer.dexOptPath(PackageDexOptimizer.java:220)
at com.android.server.pm.PackageDexOptimizer.performDexOptLI(PackageDexOptimizer.java:175)
at com.android.server.pm.PackageDexOptimizer.performDexOpt(PackageDexOptimizer.java:123)
at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:18185)
at com.android.server.pm.PackageManagerService.installPackageTracedLI(PackageManagerService.java:17780)
at com.android.server.pm.PackageManagerService.-wrap33(Unknown Source:0)
at com.android.server.pm.PackageManagerService$6.run(PackageManagerService.java:15251)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
09-06 11:33:09.701 795-810/? I/ActivityManager: Force stopping com.visiolink.reader.wrapper appid=10264 user=-1: installPackageLI
See the attached file for the complete logcat.
I think it might be a 3. party library causing the issue. I will try to remove it and see what happens.
Description
Android Plugin Version: 3.0.0-alpha6
Running `./gradlew -q tasks -m` should not print out anything, but if your project still uses the `compile` dependency configuration anywhere, it will print out something along the lines of
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
The plugin should respect the `-q` quiet flag and not print anything out. It looks like this print is coming from `com.android.build.gradle.AndroidConfig` class, close to the bottom (in the `DeprecatedConfigurationAction.execute` method).