2017-10-01 3 views
0

난 그냥 Jcenter에서 발리 추가 :안드로이드 Gradle을 컴파일 발리 오류

compile 'com.android.volley:volley:1.0.0' 

을하지만 Gradle을 동기화 할 때 나는 다음과 같은 오류가 발생합니다 :

Error:Gradle DSL method not found: 'has()' 

이 내 Gradle을 프로젝트 파일입니다

// Top-level build file where you can add configuration options common to all sub-projects/modules. 

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

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     maven { url "https://jitpack.io" } 
     jcenter() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

내 모듈 gradle 파일입니다.

,
apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion '25.0.2' 
    defaultConfig { 
     applicationId "com.dash.dashapp" 
     minSdkVersion 21 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
     debug { 
      minifyEnabled true 
      proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 
     } 
     release { 
      minifyEnabled true 
      proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile 'com.android.support:appcompat-v7:25.3.1' 
    compile 'com.android.support:design:25.3.1' 
    compile 'com.android.support:support-v4:25.3.1' 
    compile 'com.android.support:recyclerview-v7:25.3.1' 
    compile 'com.android.support:cardview-v7:25.3.1' 
    compile 'com.google.code.gson:gson:2.8.0' 
    compile 'com.mindorks:placeholderview:0.2.7' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    compile 'com.github.PhilJay:MPAndroidChart:v3.0.2' 
    compile 'com.android.volley:volley:1.0.0' 
    testCompile 'junit:junit:4.12' 
} 

답변

0

'그러므로 내가 돈, 내가 Gradle을 사용하여 프로젝트를 가져올 결정 불행하게도 전에 나는이 대답을 본 적이

publish = project.hasProperty("release") 
+0

publish = project.has("release") 

에서 발리의 bintray.gradle 파일의 라인 변경 bintray.gradle 파일에 대한 액세스 권한이 있습니다. –