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

后端 未结 17 1985
故里飘歌
故里飘歌 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:31

    I faced the same issue in Android Studio version 3.5.3. This is how i fixed it.

    I updated the dependecy com.android.tools.build:gradle in my project level build.gradle file from a lower version to 3.5.3 as below.

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

    I then went ahead and edited the value of distributionUrl in gradle-wrapper.properties file as below. This file is in the directory /gradle/wrapper/ from the root of your project folder.

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

提交回复
热议问题