Build errors after Android Studio 3.2.1 upgrade
For Android Studio 3.2.1 update
Just add google()
in root level build.gradle
buildscript {
repositories {
google() // <--here
jcenter()
}
}
allprojects {
repositories {
google() // <-- here
jcenter()
}
}
and see the magic - error is gone.
Any android Studio version 3.2.1 show red resource but still compile
I solved it after long other searchs.
Solution :
My problem was i had 3 modules, but 2 of them had the same package name. I rename one and it solved my problem.
How i solved it:
First step, i checked if java files was the problems:
1) I deleted all my .java files
2) Deleted all activity in androidmanifest.xml
3) create a new empty activitySecond step, i checked if xml files was the problem:
1) I deleted all content in my res folder, except the layout of my empty activity
Third step, i checked if gradle library was the problem:
1) I deleted one by one my dependencies in build.gradle
I found that my line who was injected the project in the dependencies was the cause of my problems :
implementation project(':XXX')
1) When i delete it, it was fixed.
2) Therefore, i inspect it and found that if i delete the androidmanifest.xml of XXX project, it solved my problem.
3) Debugging androidmanifest.xml, i found that the id was the problem.
It seems like that androidstudio after 3.2.1 doesn't allow multiple module with same package name. So, now, all my modules have specific package name.
Gradle build error in Android Studio 3.1.3.2
The default gradle install is part of Android Studio sdk so if you moved your Android Studio files location or have the wrong PATH defined in your environment it won't find the sdk location like this. If your path is to a different android studio installation version it might not have that particular version of gradle in it.
Related Topics
How to Create Topic in Fcm Notifications
Facebook Authentication Without Login Button
Limit Height of Listview on Android
Android: When Is Oncreateoptionsmenu Called During Activity Lifecycle
Android Seekbar with Two Thumbs
Android: Appwidget with Custom View Not Working
Getting Started with Open Nfc Emulator
How to Declare Git Repository as Dependency in Android Gradle
Android Device Chooser -- Device Not Showing Up
App Always Starts Fresh from Root Activity Instead of Resuming Background State (Known Bug)
Prevent Ussd Dialog and Read Ussd Response
Error:Unexpected Lock Protocol Found in Lock File. Expected 3, Found 0
How to Use Recyclerview.Scrolltoposition() to Move the Position to the Top of Current View