Rya*_*yan 9 plugins android repository gradle
我是android studio的新手,有人写了我制作的应用程序,最初用于app发明者.我按照他的模板添加了新的东西.该应用程序与Gradle有问题,并给我以下.
"Error:(3, 0) Plugin with id 'com.android.application' not found."
Run Code Online (Sandbox Code Playgroud)
它还说我没有安装我的额外Android支持存储库,但它是.一切都是最新的.我看到很多关于更新Gradle的事情,如果SDK管理器没有,我该怎么做.
代码是:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.0.2"
defaultConfig {
applicationId "contactorganizer.introcode.or.myapplication"
minSdkVersion 8
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.0'
}
Run Code Online (Sandbox Code Playgroud)
抱歉没有太多的知识.如果您想要这个项目,我可以通过电子邮件发送给您,因为我完全没有线索,并且很乐意建立这个.谢谢你的帮助!
小智 20
当我将Android Studio更新到最新版本时,我遇到了同样的问题.这是我如何解决它.
第一步: 将以下代码添加到build.gradle的顶部:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
}
}
allprojects {
repositories {
jcenter()
}
}
Run Code Online (Sandbox Code Playgroud)
第二步:找到gradle-wrapper.properties.将最后一句改为:
distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip
Run Code Online (Sandbox Code Playgroud)
希望这对你有用.
| 归档时间: |
|
| 查看次数: |
33192 次 |
| 最近记录: |