![](/img/trans.png)
[英]Could not find property 'compile' on org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Decorated@397740e0
[英]Error:(33, 0) Could not find property 'compile' on org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Decorated@3da55115
我的項目需要同步。 當我在build.gradle文件中添加一些依賴項時,它通過一些錯誤,請幫助我
有我的代碼:
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
maven {
url 'http://clojars.org/repo'
} }
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.pusher:pusher-java-client:1.0.0'
// for our HTTP requests later
compile 'com.google.code.gson:gson:2.2.4', // for parsing JSON
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.squareup.picasso:picasso:2.1.1' // for image rendering
}
作為屬性進行編譯。 您應該使用正確的FORMAT 。
別
compile 'com.google.code.gson:gson:2.2.4', // Remove ,
做
compile 'com.google.code.gson:gson:2.2.4'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.