Flutter生成aar供Android原生应用使用时出现异常
Execution failed for task ':app:mergeExtDexDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform artifact '${***}.aar (${***})' to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-is-debuggable=true, dexing-min-sdk=19}.
> Execution failed for DexingNoClasspathTransform: D:\res\.gradle\caches\transforms-2\files-2.1\e0ce6c92e840e76e8bd4e231d956bbb1\flutter_release-1.2\jars\libs\flutter.jar.
> Error while dexing.
解决方案:
添加
compileOptions {
sourceCompatibility '1.8'
targetCompatibility '1.8'
}