导入开源项目出现的问题

Error:(2, 0) Plugin with id 'com.github.dcendents.android-maven' not found

出现这个问题时在项目的build.gradle中的dependencies添加以下两段代码即可

classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'

Warning:The specified Android SDK Build Tools version (22.0.1) is ignored, as it is below the minimum supported version (26.0.2) for Android Gradle Plugin 3.0.1.Android SDK Build Tools 26.0.2 will be used.To suppress this warning, remove "buildToolsVersion '22.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

出现这个问题是app build.gradle和导入项目里的
compileSdkVersion、buildToolsVersion不一致
只需使app build.gradle和项目中的一致即可。

Error:Unsupported method: BaseConfig.getApplicationIdSuffix().The version of Gradle you connect to does not support that method.To resolve the problem you can change/upgrade the target version of Gradle you connect to.Alternatively, you can ignore this exception and read other information from the model.

只需到项目build.gradle修改grade版本就可以

发表评论

电子邮件地址不会被公开。 必填项已用*标注