tags | |
---|---|
|
In these days, I have updated Android Gradle Plugin from v3.0.1
to v3.1.2
,
and got this issule when installing the apk file on Android 5.1 devices:
> Failure [INSTALL_FAILED_DEXOPT]
Then, after changing the Android Gradle Plugin to v3.1.3
, the installtion is successful...
I guess it is a bug of Android Gradle Plugin v3.1.2
with D8
:
New DEX compiler, D8
By default, Android Studio now uses a new DEX compiler called D8. DEX compilation is the process of transforming .class bytecode into .dex bytecode for the Android Runtime (or Dalvik, for older versions of Android). Compared to the previous compiler, called DX, D8 compiles faster and outputs smaller DEX files, all while having the same or better app runtime performance.
D8 shouldn't change your day-to-day app development workflow. However, if you experience any issues related to the new compiler, please report a bug. You can temporarily disable D8 and use DX by including the following in your project's gradle.properties file:
android.enableD8=falseSee: https://developer.android.com/studio/releases/gradle-plugin
To prove it, I rolled back the Android Gradle Plugin to v3.1.2
and added android.enableD8=false
, it works too...
Yes, that fixed my problem but now I can't use Firebase...