I have tried everything I even remove the jcenter line. I really do not know what is wrong with my gradle files this error did not show on my last projects, Please help I have a deadline and I cant get past this error.
My Gradle file's Screenshot
Where is this line?:
classpath 'com.google.gms:google-services:4.3.10' // Google Services plugin
See documentation.
Related
After adding Fabric app id in application manifest and initializing fabric in application class file, I am now facing another exception with the following stacktrace.
java.lang.RuntimeException: Unable to create application fibamlscan.app.App: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: The Crashlytics build ID is missing. This occurs when Crashlytics tooling is absent from your app's build configuration. Please review Crashlytics onboarding instructions and ensure you have a valid Crashlytics account.
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6309)
at android.app.ActivityThread.access$1200(ActivityThread.java:241)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1807)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7156)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
Caused by: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: The Crashlytics build ID is missing. This occurs when Crashlytics tooling is absent from your app's build configuration. Please review Crashlytics onboarding instructions and ensure you have a valid Crashlytics account.
at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:243)
at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:211)
at io.fabric.sdk.android.InitializationTask.onPreExecute(InitializationTask.java:44)
at io.fabric.sdk.android.services.concurrency.AsyncTask.executeOnExecutor(AsyncTask.java:611)
at io.fabric.sdk.android.services.concurrency.PriorityAsyncTask.executeOnExecutor(PriorityAsyncTask.java:43)
at io.fabric.sdk.android.Kit.initialize(Kit.java:69)
at io.fabric.sdk.android.Fabric.initializeKits(Fabric.java:466)
at io.fabric.sdk.android.Fabric.init(Fabric.java:410)
at io.fabric.sdk.android.Fabric.setFabric(Fabric.java:368)
at io.fabric.sdk.android.Fabric.with(Fabric.java:339)
at fibamlscan.app.App.onCreate(App.java:28)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1158)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6304)
at android.app.ActivityThread.access$1200(ActivityThread.java:241)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1807)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7156)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
I have tried literally everything possible as suggested in stacktrace. but nothing worked in getting rid of this error.
I have also checked inside my build folder that build id is being generated after every build, but I cannot figure out why Crashlytics cannot use that build id.
This is the build id generated inside res/values of build folder automatically.
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<!--
This file is automatically generated by Crashlytics to uniquely
identify individual builds of your Android application.
Do NOT modify, delete, or commit to source control!
-->
<string tools:ignore="UnusedResources,TypographyDashes" name="com.crashlytics.android.build_id" translatable="false">1f3b35bb-2686-4f3f-91fe-87e8a05e2f71</string>
</resources>
Fabric/Firebaser here -
This is usually due to a issue with configuring the instructions for installing Fabric. Ensure that ext.enableCrashlytics = false isn't set in any build configuration that you're calling the Fabric.with statement in.
Also make sure that apply plugin 'io.fabric' is in your build.gradle after apply plugin: 'com.android.application.
Finally, if you happen to be running much older versions of Fabric or Crashlytics, try updating those dependencies. Complete instructions and information here: https://fabric.io/kits/android/crashlytics/install.
perhaps it's a little bit old, but I had this issue as well. I had to put those plugins IN ORDER at the bottom of build.gradle file:
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
I know I took too much time to notify that I found the solution or not, but I found the solution a few weeks after asking the question itself, and the solution is in no way related to Firebase Crashlytics, and also none of he answers I got here worked for me, and I don't know why. I searched the internet for quite a long time after I found the solution, to find out why that silly solution worked despite of the fact that it is unrelated.
So here is the solution, as far as I can remember, since I found solution quite a long time ago, I think I changed the app icon to some custom app icon, and changed the app icon reference in manifest file also. And that worked like a charm!!
I am really sorry If I can't give an explanation for the solution because it was a hit and trial method, but do try it in your end and tell me if it worked or not. And in case if it worked, and you found a convincing explanation of why it worked, please let me know in the comments section.
Same issue I am facing resolved by two step
Step 1 - Enable Crashlatics in firebase consol - select project ->
Quality- > Crashlatics -> Click Enable Button
Step 2 - downgrade the gradle version form
classpath 'com.android.tools.build:gradle:4.1.0-alpha08'
To
classpath 'com.android.tools.build:gradle:3.5.3'
Work Perfectly for me But make sure you use below configuration
in project gradle file
classpath 'io.fabric.tools:gradle:1.31.2'
repositories {
maven {
url 'https://maven.fabric.io/public'
}
}
And app gradle file
apply plugin: 'io.fabric'
and dependency
implementation "com.crashlytics.sdk.android:crashlytics:$FIREBASE_CRASHLATICS_VERSION"
Though it is a older question, adding the answer that worked for us as We got this error today but not of much valid help available in web or even here.
Following are the changes made to remove the error "Crashlytics build ID is missing". Please note, this error appears only when the app is run but not in Gradle Sync, Build, Rebuild.
Add the following line to app\res\strings\strings.xml
<string name="com.google.firebase.crashlytics.mapping_file_id">none</string>
Make sure the following dependencies exists in build.gradle(Project)
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
Make sure following dependencies exists in build.gradle(Module)
// Crashlytics
implementation 'com.google.firebase:firebase-crashlytics:18.3.3'
implementation 'com.google.firebase:firebase-crashlytics-ktx:18.3.2'
Note: Use above lines as applicable (Java and or kotlin), please update the version numbers as applicable.
Sync Gradle, Rebuild, Run the app. Error should disappear.
Thanks to all contributors who indicated various above points.
I was using databinding in my project. Then I want to use Firebase so I added google service plugin in my project
classpath com.google.gms:google-services:3.3.1
after this... my project cannot compile with the error:
Cannot change dependencies of configuration :app:api after it has been included in dependency resolution.
if I disable databinding.. or remove google service plugin, this error will be gone.
I still want to use databinding.. help!!
Just realize this is a known issue. no solution for now.
Need to disable google service plugin for now
https://issuetracker.google.com/issues/79122163
The error has disappeared after updating to
classpath 'com.google.gms:google-services:4.0.1'
I am facing this error
Error:Execution failed for task ':app:processDebugGoogleServices'.
File google-services.json is missing. The Google Services Plugin cannot
function without it.
Searched Location:
C:\Users\Kartik\AndroidStudioProjects\barcode\app\src\debug\google-
services.json
C:\Users\Kartik\AndroidStudioProjects\barcode\app\google-services.json
I have added this path in build.gradle(project:barcode)
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:3.0.0'
and added this in build.gradle(Module:app)
apply plugin: 'com.google.gms.google-services'
I have also added the google-services.json file in project->app folder but then also it is giving the same error.
i faced the same problem before .
check the json file name and make sure that there is no additional spaces
First of all please make sure that you have followed documentation for firebase and not google developers guidelines and alspo generated Google-services.json for firebase project that is running in your firebase-console, you can see all your running projects in your dashboard in firebase
Make sure you have correct json file, this problem is describe here.
You can follow these steps also as per firebase documentaion.
still if you are all correct and getting errors make sure you have updated play services version in your SDK and also put this line in your app module build.gradle file, to make sure that multidex is unable. Hope you will make something out of it.
defaultConfig {
multiDexEnabled true
}
I am new to Google Analytics, where trying to integrate google-analytics-v4 into my application
Adding the clasapath in the top-level build.gradle of my application i.e.,
classpath 'com.google.gms:google-services:1.4.0-beta3'
while gradle build running, i am getting the below error
**Execution failed for Task':Ignitor:transformClassessWithJarMergingForArmDebug
con.android.build.transform.api.TransformException:java.util.zip.ZipException:duplicate entry: org/acra/Acra$1.class**
If I remove the above classpath from build.gradle, application executes smoothly without any issues
I am following the below link for reference of adding Analytics
https://developers.google.com/analytics/devguides/collection/android/v4/
kindly somebody help me to overcome this
This is happening since you might have already added a library which has that mentioned class in it. To resolve check the libraries you have added.
PS Also check the libraries you are adding via dependency in gradle
I finally managed to get google app invites working in my app. I enabled them on the developer console and followed this guide. The following steps were giving me problems:
Add the dependency to your project's top-level build.gradle:
classpath 'com.google.gms:google-services:1.3.0-beta1'
Add the plugin to your app-level build.gradle:
apply plugin: 'com.google.gms.google-services'
Copy the google-services.json file you just downloaded into the app/ or mobile/ directory of your Android Studio project.
By adding that classpath I had to use jcenter as my repository, as this package isn't available at mavenCentral. However, even if I built the project with jcenter as a repository, the gradle build failed with an empty error message. I tried to debug the problem but the stacktrace for the crash was enormous.
My solution was to simply ignore these steps. The app invites are working flawlessly since then.
With this in mind, here goes my question. Why were all these steps listed on the official google guide if they are not necessary? Am I missing something here?
When I started official sample for Invite API yesterday, I had problem but just because of version of google-services (1st step -> add the dependency of your project's top-level build.gradle), so I have to change it to the latest version:
classpath 'com.android.tools.build:gradle:1.3.0-beta4'
classpath 'com.google.gms:google-services:1.3.0-beta4'
and this solves all problems. I don't understand your question, which step you exactly skipped of these 3 steps mentioned and made invite api functional?
Finally found the answer. The service was working on my prototype because it doesn't check for credentials on the test device. Once released to public, the keys are needed for the service to work correctly as Ituoke Ajanlekoko said in the comments.
Further information can be found at this topic:
What does google-services.json really do?