Ich benutze Firebase Sdk in Android, in dem ich einen Fehler bekomme als nicht laden 'com.google.Gson.JsonObject'.Ebenso habe ich die jdk von 1,7 auf 1.8 aber es hat nicht funktioniert. Jeder weiß, warum es nicht synchronisiert ist.Nicht in der Lage, die Gradle für Firebase in Android zu synchronisieren
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "nidhinkumar.firebaseexample"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
} }
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:24.0.0-alpha1'
compile 'com.google.firebase:firebase-core:9.2.1'
} apply plugin: 'com.google.gms.google-services'
Fehler:
Error:Unable to load class 'com.google.gson.JsonObject'.
Possible causes for this unexpected error include:<ul><li>Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) <a href="syncProject"> Re-download dependencies and sync project (requires network)</a></li><li>The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.<a href="stopGradleDaemons">Stop Gradle build processes (requires restart)</a></li></ul>In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
immer noch bekomme ich den gleichen Fehler –