I am trying to build an application in Android and I tried using the FirebaseUI, but I am getting this error:
error: cannot access zzeuq
class file for com.google.android.gms.internal.zzeuq not found
Here is my gradle file.
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.vanillatalk.vanillatalk"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
compile 'com.android.support:design:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.firebase:firebase-auth:11.6.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-database:11.6.0'
implementation 'com.google.firebase:firebase-storage:11.6.0'
implementation 'de.hdodenhof:circleimageview:2.2.0'
compile 'com.theartofdev.edmodo:android-image-cropper:2.7.+'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.firebaseui:firebase-ui-database:4.0.0'
}
apply plugin: 'com.google.gms.google-services'
I think that the error is related to missmatched versions of firebase, since it 11.6.0 and firebase-ui-database:4.0.0, but I cannot seem to find the correct versions for the firebase-ui-database that would match the 11.6.0?
Could anyone help?
If you want to use version 4.0 of firebase ui you need to update firebase dependencies:
implementation 'com.google.firebase:firebase-database:16.0.1'
For version 11.6.0 of firebase you should use version 3.x.x of Firebase UI, see this.
You have to use all latest library dependency to use
implementation 'com.firebaseui:firebase-ui-database:4.0.0'
Now I checked that when I use firebase-database:15.0.1 library it's doesn't let me do syn properly.
Use the latest version of all other library dependency, I'm it will be work.
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'
Or you can try to find firebase-database:11.6.0 this version similar FirebaseUi library. But it's hard to found.
Thanks.
Related
So I am assuming I have differing versions of dependencies causing this issue but i cant seem to resolve it.
When I add the dependency: implementation 'com.google.android.gms:play-services-vision:18.0.0' Then I get an error Syncing my build gradle.
When I change the version to implementation 'com.google.android.gms:play-services-vision:15.0.0' Then It Syncs fine but my app keeps crashing as soon as I open it.
Please can someone help me sync my versions so my app doesnt crash.
I changed the version from 18.0.0 to 15.0.0.
My gradle:
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.ecommerce"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.firebaseui:firebase-ui-database:3.2.2'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.github.rey5137:material:1.2.5'
implementation 'com.android.support:cardview-v7:+'
implementation 'com.android.support:recyclerview-v7:+'
implementation 'io.paperdb:paperdb:2.6'
implementation 'com.android.support:design:28.0.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.google.android.gms:play-services-vision:18.0.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.+'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.sup`enter code here`port.test.espresso:espresso-core:3.0.2'
}
After some research I actually found out that Google stopped updating com.google.android.gms:play-services after 12.0.1. I changed the versions as well as my Firebase versions. Everthing Synced with no errors and seems to be running fine now.
first go to file and sync project with gradle file.. if it repeat itself, then go to file and invalidate caches/Restart it has work for me alot of time and also try and replace minSdkVersion 15 to minSdkVersion 21 and also with the look of it your firebase dependence are old check out https://firebase.google.com/docs/android/setup or google firebase dependencies
also make sure you add allprojects
{
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
to your build.gradle
Whenever i build my project in android studio it gives me the following error
Program type already present: com.google.android.gms.ads.identifier.AdvertisingIdClient$Info
below is my build.gradle file
lastly the line that has implementation 'com.android.support:design:27.0.0' also gives an error saying...
All com.android.support libraries must use the exact same version specification
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.iwatchug"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:27.0.0'
implementation 'com.google.firebase:firebase-auth:16.2.1'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services:7+'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
repositories {
google()
}
apply plugin: 'com.google.gms.google-services'
Remove the following line:
implementation 'com.google.android.gms:play-services:7+'
From the docs:
Note: Don't use the combined play-services target. It brings in dozens of libraries, bloating your application. Instead, specify only the specific Google Play services APIs your app uses.
You need to add specific google play services library, example:
implementation 'com.google.android.gms:play-services-vision:17.0.2'
Ever since the update, I keep getting the following error when I build. I have tried clean and build but the error persists:
This is the error I get when I try to build:
Error: Program type already present: org.apache.xmlbeans.xml.stream.Location
The problem seems to be related to an issue with xmlbeans-2.6.0.jar, however I don't really understand what's it trying to do by "dexingTransform". Do I need to add anything to my gradle to support my project after the update?
This is my build.grade:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "app.testApp"
minSdkVersion 26
targetSdkVersion 28
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:multidex:1.0.3'
implementation "org.apache.poi:poi:3.17"
implementation "org.apache.poi:poi-ooxml:3.17"
implementation 'com.fasterxml:aalto-xml:1.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.jakewharton:butterknife:8.5.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
and the following reported errors that I cannot understand, which are coming up after the update:
org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Caused by: org.gradle.api.artifacts.transform.ArtifactTransformException: Failed to transform file 'xmlbeans-2.6.0.jar' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=26} using transform DexingTransform
Caused by: com.android.tools.r8.utils.AbortException: Error: Program type already present: org.apache.xmlbeans.xml.stream.Location
Ok, I have figured out what the problem was. Turns out after updating to gradle 4.4, you'll get an error if you have duplicate library references in your project. In my case, this was xmlbeans-2.6.0.jar, and I had the following dependencies clashing with each other:
implementation "org.apache.poi:poi:3.17"
implementation "org.apache.poi:poi-ooxml:3.17"
implementation 'com.fasterxml:aalto-xml:1.0.0'
implementation 'com.jakewharton:butterknife:8.5.1'
So in my case I kept the following, and commented out the rest:
//implementation "org.apache.poi:poi:3.17"
//implementation "org.apache.poi:poi-ooxml:3.17"
//implementation 'com.fasterxml:aalto-xml:1.0.0'
implementation 'com.jakewharton:butterknife:8.5.1'
I then re-synced gradle, clean and build the project, and my issue was resolved.
I have tried to connect my project on Android studio to Firebase database. While trying to do so I have added some code lines to the app gradle file. Then I got an error that I can't solve for a week...
Although this error I can run the app on the emulator so I continued the process of getting connected to Firebase.
After I finished that, I have tried to add something to the database- and no success.
Please if you know how to fix this problem- help me :)
app gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.rotem.bepart"
minSdkVersion 27
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-auth:16.0.4'
implementation 'com.google.firebase:firebase-database:16.0.3'
implementation 'com.google.firebase:firebase-core:16.0.4'
}
apply plugin: 'com.google.gms.google-services'
The error:Image of the error
The error text:
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 26.1.0. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:support-media-compat:26.1.0 less... (Ctrl+F1)
There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion). Issue id: GradleCompatible
Add this line in your gradle
implementation 'com.android.support:support-v4:28.0.0'
Your gradle will look like
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
.
.
.
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.example.speakplease"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation ('com.google.apis:google-api-services-translate:v2-rev47-
1.22.0')
implementation 'com.google.cloud:google-cloud-translate:0.5.0'
implementation 'com.google.firebase:firebase-database:16.0.3'
implementation 'com.android.support:support-v13:28.0.0'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.2'
compileOnly 'com.google.dagger:dagger-parent:2.9'
//noinspection GradleDependency
annotationProcessor 'com.google.auto.value:auto-value:1.2'
}
apply plugin: 'com.google.gms.google-services'
I have imported google translation api and after that I started getting Annotation error. I am able resolve it but not getting this error. I am aware of it that some dependencies are clashing but unable to find out.
Here is the error.
Program type already present:
com.google.protobuf.AbstractMessageLite$Builder$LimitedInputStream
Message{kind=ERROR, text=Program type already present:
com.google.protobuf.AbstractMessageLite$Builder$LimitedInputStream,
sources=[Unknown source file], tool name=Optional.of(D8)}
This is what happens when your 2 dependencies include the same dependency. Check out this question to find out how to see which dependency is causing the issue.
I have had the same problem, for me it was ExoPlayer, cause It was included in a 3rd party library I was using, and I included it by itself also.
I don't know for sure which 2 are in conflict for you, but these seem suspiciously "related":
implementation ('com.google.apis:google-api-services-translate:v2-rev47-1.22.0')
implementation 'com.google.cloud:google-cloud-translate:0.5.0'