2016-08-08 3 views
11

के संस्करण मैं अपने फायरबेस पुस्तकालयों को नए 9.4.0 संस्करण में अपग्रेड करने का प्रयास कर रहा हूं; हालांकि, मुझे सिंक्रनाइज़ेशन पर ग्रिडल में "हल नहीं कर सकता" त्रुटि मिलती है। यहां त्रुटि है:ग्रैडल सबसे हालिया फायरबेस पुस्तकालयों को हल नहीं कर सकता है, यानी 9.4.0

Error:(38, 13) Failed to resolve: com.google.firebase:firebase-core:9.4.0 
Error:(40, 13) Failed to resolve: com.google.firebase:firebase-auth:9.4.0 
Error:(40, 13) Failed to resolve: com.google.firebase:firebase-storage:9.4.0 

फ़ायरबेस-कोर के साथ और बिना किसी फर्क का कोई फर्क नहीं पड़ता।

यहाँ दोनों एप्लिकेशन और परियोजना के स्तर के लिए मेरे Gradle है: परियोजना का स्तर:

buildscript { 
repositories { 
    jcenter() 
    mavenLocal() 
} 
dependencies { 
    classpath 'com.android.tools.build:gradle:2.1.2' 
    classpath 'com.google.gms:google-services:3.0.0' 
    // NOTE: Do not place your application dependencies here; they belong 
    // in the individual module build.gradle files 
} 
} 

allprojects { 
repositories { 
    jcenter() 
    mavenLocal() 
} 
} 

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

और मॉड्यूल के लिए: अनुप्रयोग का स्तर: लागू प्लगइन: 'com.android.application'

android { 
compileSdkVersion 24 
buildToolsVersion "24.0.0" 

defaultConfig { 
    applicationId "com.example.main.projectone" 
    minSdkVersion 18 
    targetSdkVersion 24 
    versionCode 1 
    versionName "1.0" 
    multiDexEnabled true 
} 
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.google.android.gms:play-services-gcm:9.2.0' 
// compile 'com.google.android.gms:play-services:9.2.1' 

compile('com.facebook.android:facebook-android-sdk:4.7.0') { 
    exclude module: 'bolts-android' 
} 

// compile 'com.fasterxml.jackson.core:jackson-core:2.8.1' 
// compile 'com.fasterxml.jackson.core:jackson-databind:2.8.1' 


compile 'com.android.support:appcompat-v7:24.0.0' 
compile 'com.google.firebase:firebase-core:9.4.0' 
compile 'com.google.firebase:firebase-auth:9.4.0' 
compile 'com.google.firebase:firebase-storage:9.4.0' 
compile 'com.android.support:design:24.0.0' 
compile 'com.parse:parse-android:1.13.0' 
compile 'com.github.bumptech.glide:glide:3.7.0' 
compile 'com.github.bumptech.glide:okhttp3-integration:[email protected]' 
compile 'com.squareup.okhttp3:okhttp:3.3.1' 
compile 'com.android.support:cardview-v7:24.0.0' 
compile 'com.android.support:support-v4:24.0.0' 
compile 'com.google.android.gms:play-services:9.2.1' 
compile 'com.android.support:multidex:1.0.1' 
compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.1' 
compile 'de.hdodenhof:circleimageview:2.1.0' 
compile 'com.android.support:recyclerview-v7:24.0.0' 
} 

apply plugin: 'com.google.gms.google-services' 

कोई विचार क्यों ग्रैडल पुस्तकालयों को हल नहीं कर सकता है? फायरबेस वेबसाइट यहां उन्हें Firebase Newest Libs संबोधित कर रही है। आपकी सहायता की सराहना।

+1

संभावित डुप्लिकेट [हल करने में विफल: com.google.firebase: firebase-core: 9.0.0] (http://stackoverflow.com/questions/37310188/failed-to-resolve-com-google-firebasefirebase- core9-0-0) –

+0

क्या आप इस [प्रश्न] (https://stackoverflow.com/questions/47438092/in-app-billing-connect-to-firebase-and-get-products) के साथ मेरी सहायता कर सकते हैं? – Stuart2041

+0

@ Stuart2041 क्षमा करें, यह थोड़ी देर हो गया है, मैं एंड्रॉइड के आसपास नहीं था, लेकिन अगर आपके प्रश्न पर पहले से ही उत्तर दिया गया है तो मुझे यह बताने में मदद नहीं मिलती है और मुझे एक और नजर डालने में खुशी होगी। चीयर्स – TheeBen

उत्तर

11

एंड्रॉइड स्टूडियो में एसडीके टूल्स अपडेट करने के लिए आवश्यक आवश्यक नई लाइब्रेरी चुन सकते हैं। नवीनतम संस्करणों में Google Play Services और Google Repository को अपग्रेड करने के बाद, मैं फ़ायरबेस पुस्तकालयों के नवीनतम संस्करण 9.4.0 के साथ सामना करने वाले एक ही मुद्दे को हल करने में सक्षम था Android Studio SDK Tools

0

अपने मॉड्यूल में: एप्लिकेशन, के बाद से, आप नए 9.4.0 संस्करण के सभी Firebase पुस्तकालयों का उपयोग कर रहे बजाय compile 'com.google.android.gms:play-services:9.4.0'compile 'com.google.android.gms:play-services:9.2.1' जोड़ने का प्रयास करें। या आप Setting Up Google Play Services

2

मुझे बिल्कुल वही समस्या थी और इसे समझ में नहीं आया, लेकिन यह मेरे लिए क्या तय किया गया है:

मैं एसडीके प्रबंधक -> एसडीके टूल्स और संशोधित "Google रिपोजिटरी" को 31 से संशोधित करने के लिए संशोधित किया गया। इसके बाद मैंने अपनी परियोजना को फिर से सिंक करने की कोशिश की और यह जादूगर रूप से काम किया।

+0

मैं अद्यतन करने गूगल भंडार आवश्यक था लगता है, लेकिन मुझे नहीं पता था मैं मैन्युअल SDK में इसे डाउनलोड करने के बाद कुछ बदलने की जरूरत है। धन्यवाद दोस्त। – TheeBen

संबंधित मुद्दे