Gradle project sync failing after Google announced the new sdk versioning system
This issue seems to have been resolved by using the new google-services release (4.0.1 as of today). Below is the relevant versions that will resolve the stated issue:
In your project build.gradle files:
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.1' }
In your app build.gradle files:
//Firebase Dependencies
implementation "com.google.firebase:firebase-messaging:17.0.0"
implementation "com.google.firebase:firebase-core:16.0.0"
implementation "com.google.firebase:firebase-config:16.0.0"
implementation 'com.google.firebase:firebase-perf:16.0.0'
...} apply plugin: "com.google.gms.google-services"
Databinding is set to true as well:
dataBinding {
enabled = true
}
Android Studio version: 3.1.2
Thank you all for providing various ways you can get around the problem, such as the answer by @Kyle and the medium post link that shows you how to use firebase without google services.
Gradle project sync failing after Google announced the new sdk versioning system
This issue seems to have been resolved by using the new google-services release (4.0.1 as of today). Below is the relevant versions that will resolve the stated issue:
In your project build.gradle files:
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.1' }
In your app build.gradle files:
//Firebase Dependencies
implementation "com.google.firebase:firebase-messaging:17.0.0"
implementation "com.google.firebase:firebase-core:16.0.0"
implementation "com.google.firebase:firebase-config:16.0.0"
implementation 'com.google.firebase:firebase-perf:16.0.0'
...} apply plugin: "com.google.gms.google-services"
Databinding is set to true as well:
dataBinding {
enabled = true
}
Android Studio version: 3.1.2
Thank you all for providing various ways you can get around the problem, such as the answer by @Kyle and the medium post link that shows you how to use firebase without google services.
Gradle Error:Execution failed for task ':app:processDebugGoogleServices'
I'v got a same issue. but Now I'm fixed.
You should delete a line apply plugin: 'com.google.gms.google-services'
because "com.android.application" package already has same package.
Android Studio error Installed Build Tools revision 31.0.0 is corrupted
First of all, I faced this issue in Android Studio 4.2.2 and you do not need to downgrade the SDK build tool from 31 to 30 or change compile SDK version.
The main problem is the two files missing in SDK build tool 31 that are:
- dx.bat
- dx.jar
The solution is that these files are named d8 in the file location so changing their name to dx will solve the error.
The steps are below.
For Windows
go to the location
"C:\Users\user\AppData\Local\Android\Sdk\build-tools\31.0.0"
find a file named d8.bat. This is a Windows batch file.
rename d8.bat to dx.bat.
in the folder lib ("C:\Users\user\AppData\Local\Android\Sdk\build-tools\31.0.0\lib")
rename d8.jar to dx.jar
Remember AppData is a hidden folder. Turn on hidden items to see the AppData folder.
For macOS or Linux
Run the following in the Terminal:
# change below to your Android SDK path
cd ~/Library/Android/sdk/build-tools/31.0.0 \
&& mv d8 dx \
&& cd lib \
&& mv d8.jar dx.jar
Now run your project.
Related Topics
How to Create an Android Spinner as a Popup
Android: Share Session Between Webview and Httpclient
Android Viewmodel Has No Zero Argument Constructor
Android: Converting Color Image to Grayscale
Not Able to Debug App in Android Studio
Animation for Expandablelistview
Confused About Testcompile and Androidtestcompile in Android Gradle
Simulate Killing of Activity in Emulator
Camera Preview Stretched on Few Android Devices
Conversion from String to JSON Object Android
How to Get Spinner Selected Item Value to String
Get Application Installed Date on Android