Android Studio lässt mich das nicht bauen. Es sagt, dass com.mixpanel.blahblahblah nicht gefunden wird. com.mixpanel.blahblahblah kommt von mavenCentral() Ich weiß, das Problem liegt daran, dass es mavenCentral() nicht erkennt, weil es nur das andere Repo erkennt. Wie kann ich beides einbeziehen und dieses Projekt zum Laufen bringen?Wie mehrere Repositories in build.gradle enthalten?
apply plugin: 'com.android.application'
apply plugin: 'crashlytics'
buildscript {
repositories {
maven { url 'http://download.crashlytics.com/maven' }
}
dependencies {
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
}
}
repositories {
maven { url 'http://download.crashlytics.com/maven' }
mavenCentral()
}
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "co.dilmile.dilmile"
minSdkVersion 9
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.parse.bolts:bolts-android:1.1.2'
compile 'com.loopj.android:android-async-http:1.4.6'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.facebook.android:facebook-android-sdk:3.20.0'
compile 'com.android.support:support-v4:21.0.3'
compile 'org.roboguice:roboguice:3.+'
compile 'com.google.code.findbugs:jsr305:1.3.9'
provided 'org.roboguice:roboblender:3.+'
compile 'com.crashlytics.android:crashlytics:1.+'
compile 'com.mixpanel.android:mixpanel-android:4.5.3'
}
Wenn Sie die 'kompilieren‚com.mixpanel.android Kommentar aus: mixpanel-android: 4.5.3'' Linie, wird der Rest der App bauen? Wenn dies der Fall ist, ist Ihr Problem nicht direkt die 'mavenCentral()' Anweisung, da die meisten anderen Informationen in Ihren 'Abhängigkeiten' von dort stammen. – CommonsWare
ja es baut ohne diese Zeile. Aber ich habe gerade erst mavenCentral() hinzugefügt, bevor ich das com.mixpanel hinzugefügt habe. Wenn ich mavenCentral() und com.mixpanel entferne, funktioniert es gut und die anderen Abhängigkeiten bauen auf. – bharv14