update the Android Gradle plugin from the current version 3.4.1 to version 3.5.2 and Gradle to version 5.4.1 fails [duplicate]

这一生的挚爱 提交于 2020-03-26 03:20:57

问题


When I load the project Roboyard Version 9.0 into Android Studio, building works fine, but A.S. suggests to upgrade Gradle. When I do so, I cannot build the App any more, I get the error

Execution failed for task ':app:javaPreCompileDebug'.
> Could not resolve all files for configuration ':app:debugCompileClasspath'.
   > Failed to transform artifact 'support-v4.aar (com.android.support:support-v4:21.0.2)' to match attributes {artifactType=android-classes, org.gradle.usage=java-api}.
      > Execution failed for AarToClassTransform: /home/ruben/.gradle/caches/modules-2/files-2.1/com.android.support/support-v4/21.0.2/39eadabc45185963eaec97aae33466fb5a40e9a/support-v4-21.0.2.aar.
         > duplicate entry: META-INF/MANIFEST.MF

If I go to File > Project Structure... > Project > Android Gradle Plugin Version and downgrade it from 3.5.2 to 3.5.1. The buid still works perfectly without error, (but I get the upgrade suggestion again).

So there seems to be something odd in the latest gradle version 3.5.2?

来源:https://stackoverflow.com/questions/59130438/update-the-android-gradle-plugin-from-the-current-version-3-4-1-to-version-3-5-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!