Firebase UI Grade project sync failed

  • Antworten:5
Thorsten Lansmann
  • Forum-Beiträge: 5

19.09.2017, 20:01:38 via Website

Guten Abend,

ich suche nun schon lange nach einer Lösung für folgendes Problem:

Ich habe ein neues Projekt in Android Studio erstellt und nichts getan, außer die Firebase-UI-Dependencies (compile 'com.firebaseui:firebase-ui:2.3.0') hinzugefügt.
Das führt allerdings zu folgenden Fehlern:

Error:Failed to resolve: com.android.support:customtabs:26.0.1
Error:Failed to resolve: com.android.support:support-v4:26.0.1
Error:Failed to resolve: com.android.support.constraint:constraint-layout:1.1.0-beta1

Hier meine build.gradle (Project):

// 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 {
jcenter()
}
}

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

Und hier meine build.gradle (app):

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "memyselfandi.styletest15"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
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:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.firebaseui:firebase-ui:2.3.0'
testCompile 'junit:junit:4.12'
}

Kann mir jemand hier weiterhelfen?!

Danke im Voraus und Gruß,
Thorsten

Antworten
Pascal P.
  • Admin
  • Forum-Beiträge: 11.286

19.09.2017, 20:37:37 via Website

Hallo Thorsten,
hast du mal probiert, was passiert, wenn du die angeblich fehlenden Libs auch mit compile einbindest?

LG Pascal //It's not a bug, it's a feature. :) ;)

Antworten
Thorsten Lansmann
  • Forum-Beiträge: 5

19.09.2017, 20:57:58 via Website

Habe es gerade ausprobiert... gibt noch einige Fehler mehr. :(

image

Antworten
Pascal P.
  • Admin
  • Forum-Beiträge: 11.286

19.09.2017, 21:14:55 via Website

Ich vermute eher dass du in AS nicht die richtige SDK/API Version installiert hast.
Nimm die Einträge wieder raus und klicke dann auf "Install Repository and sync project". Danach solltest du die Packages alle haben.

LG Pascal //It's not a bug, it's a feature. :) ;)

Antworten
Thorsten Lansmann
  • Forum-Beiträge: 5

21.09.2017, 15:22:34 via Website

Ich habe es eingesetzt und folgenden Fehler erhalten:

Error:Execution failed for task ':app:processDebugManifest'.

Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.1) from [com.android.support:design:26.0.1] AndroidManifest.xml:28:13-35
is also present at [com.android.support:appcompat-v7:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:26:9-28:38 to override.

Nach kurzem googeln hat mir folgendes weitergeholfen:

,, Try to set exact versions instead of + for support libraries"

compile 'com.android.support:appcompat-v7:26.+' --->     compile 'com.android.support:appcompat-v7:26.0.1'

Jetzt funktioniert es- danke!!

— geändert am 21.09.2017, 15:23:06

Antworten