Android Studio Import Project error plugin with ID ' com. Xxxx

Source: Internet
Author: User
Tags jcenter

1. Open as, expand the list of items in the Build.gradle box.
2. Add

buildscript {    repositories {        mavenCentral() // or jcenter()    }    dependencies {        classpath ‘com.android.tools.build:gradle:3.0.1‘   // 版本号 根据自己的版本修改    }}allprojects {    repositories {        jcenter()    }}


3. If there is a junit error prompt after the modification,
Then modify

dependencies {    compile fileTree(dir: ‘libs‘, include: [‘*.jar‘])    testCompile ‘junit:junit:4.12‘    compile ‘com.android.support:appcompat-v7:25.1.0‘}

For

dependencies {    compile fileTree(dir: ‘libs‘, include: [‘*.jar‘])    //testCompile ‘junit:junit:4.12‘    testImplementation ‘junit:junit:4.12‘    compile ‘com.android.support:appcompat-v7:25.1.0‘}

The last rebuild is ok!.

Android Studio Import Project error plugin with ID ' com. Xxxx

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.