2016-05-06 17 views
0

Ich verwende das Gradle-Build-System, das mit Android Studio mitgeliefert wird. Bisher bin ich in der Lage, Multi-Projekt-Setups mithilfe von Abhängigkeiten zu erstellen, die in meiner Projektstruktur gespeichert sind. wenn ich mein Projekt baue. Ich habe einen Fehler:Wie Fehler Gradle zu beheben?

Error:(37, 13) Failed to resolve: 'com.parse.bolts:bolts-android:1.+' Show in FileShow in Project Structure 
Error:(37, 13) Failed to resolve: 'com.parse:parse-android:1.+' Show in FileShow in Project Structure 

Ich versuche, mavenCentral() einzufügen. aber es funktioniert:

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

allprojects { 
    repositories { 
     jcenter() 
     mavenCentral() 
    } 
} 

build.gradle:

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 23 
    buildToolsVersion "23.0.2" 

    defaultConfig { 
     applicationId "vaeapp.gamecard.vn" 
     minSdkVersion 14 
     targetSdkVersion 19 
     multiDexEnabled = true 
     versionCode 4 
     versionName "1.3.4" 

     ndk { 
      moduleName "gc" 
     } 
    } 

    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    //compile fileTree(dir: 'libs', include: ['*.jar']) 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:multidex:1.0.1' 
    compile 'com.android.support:appcompat-v7:23.2.0' 
    compile 'com.google.code.gson:gson:2.2.4' 
    compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2' 
    compile 'com.facebook.android:facebook-android-sdk:4.2.0' 
    // compile 'com.android.support:appcompat-v7:20.0.0' 
// compile 'com.google.android.gms:play-services:+' 
    compile 'com.google.android.gms:play-services:4.0.30' 
    compile files('libs/activation.jar') 
    compile files('libs/additionnal.jar') 
    compile files('libs/commons-io-2.4.jar') 
    compile files('libs/error-reporter.jar') 
    //compile files('libs/httpclient-4.0.1.jar') 
    compile files('libs/mail.jar') 
    compile files('libs/universal-image-loader-1.9.3.jar') 
    compile fileTree(dir: 'libs', include: 'Parse-*.jar') 
    // compile 'com.parse:parse-android:1.10.1' 
    compile 'com.parse.bolts:bolts-android:1.+' 
    compile 'com.parse:parse-android:1.+' 
} 

Antwort

0

Fügen Sie diese in Ihrem Android-tag:

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

Hoffe, dass es Ihnen hilft.

+0

Es funktioniert, vielen Dank! –

Verwandte Themen