Android Studio - Failed to apply plugin [id 'com.android.application']

后端 未结 17 2051
故里飘歌
故里飘歌 2020-12-08 12:38

I am working on an app. In my app there is no error in code but when I try to run my project it gives following errors.

Error:(1, 1) A problem occurred e

17条回答
  •  爱一瞬间的悲伤
    2020-12-08 13:35

    I had the same issue and this is what I did and I was able to solve my issue:

    • I'm working with ShimmerAndroidAPI ( this library ) with Android Studio 3.6.1.
    • This worked well before I upgrade the Gradle and Android Studio to a new version using pop up upgrade suggestions appeared in android studio.
    • I followed the below steps as mentioned in this answer and I was able to make the project work.The steps I followed are as below.
    • Gradle file was updated from classpath 'com.android.tools.build:gradle:3.6.1' to

      classpath 'com.android.tools.build:gradle:3.1.3'

    • Then distribution URL in gradle-wrapper.properties file was updated from distributionUrl=https://services.gradle.org/distributions/gradle-5.6.4-all.zip to

      distributionUrl=https://services.gradle.org/distributions/gradle-5.4.1-all.zip

    • Gradle was then synched.

提交回复
热议问题