Android Studio Error:(3, 0) Plugin with id 'com.android.application' not found

前端 未结 2 1798
悲&欢浪女
悲&欢浪女 2021-02-06 04:28

I\'m new to android studio and had somebody write an app I made which was originally used in app inventor. I followed his template and added new things. The app has a problem wi

相关标签:
2条回答
  • 2021-02-06 04:55

    I have faced the problem too. The android plugin is 1.2.3. It appears when running one module task in the module directory like this way, ../graldew :module:xxx.

    I eventually notice plugin 1.2.3 cannot get right context and android plugin 1.5 works well. So It will work to give it right gradle file.

    ../gradlew -b ../build.gradle  -c ../settings.gradle  :module:xxx
    

    This is the situation for me. You can just regard it as a reference.

    0 讨论(0)
  • 2021-02-06 04:57

    When I updated my Android Studio to the latest, I got the same problem. Here is how I solved it.

    First: Add the following code to the top of your build.gradle:

    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:1.1.0'
        }
    } 
    
    allprojects {
        repositories {
            jcenter()
        }
    }
    

    Second: Find the gradle-wrapper.properties. Change the last sentence to this:

    distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip
    

    Hope this works for you.

    0 讨论(0)
提交回复
热议问题