https://kotlinlang.org logo
Title
r

Rohit

10/14/2020, 8:09 AM
Hi, While updating to Android Studio 4.1 The project build breaks Gradle process Anyone can help resolve this
k

KV

10/14/2020, 8:14 AM
Hi Rohit, I don't remember the exact error which I faced yesterday after installing the new AS4.1 but what I tried is download the new gradle which is gradle 6.5 and sync project with gradle. And it works fine in my case 🙂
r

Rohit

10/14/2020, 8:15 AM
Thanks for response. How can I do that in the project?
k

KV

10/14/2020, 8:16 AM
Download the new gradle first and go to project setting and select the new gradle and after that sync the project
r

Rohit

10/14/2020, 8:18 AM
Yeah thanks 🙂, will update for any issues
k

KV

10/14/2020, 8:18 AM
After download the gradle, go to Android Studio -> Preferences -> Gradle and select the path of the new downloaded gradle. and after sync the project
r

Rohit

10/14/2020, 8:21 AM
But Android Studio Gradle prompts like to download that .zip file Should I proceed with this
g

gildor

10/14/2020, 8:50 AM
It’s some of your Gradle plugins, it’s not compatible with new plugin API of Android Gradle Plugin 4.1
It should be reproducible, just build with gradle flag
--stacktrace
it will show stacktrace so it would be possible to see which plugin is not compatible
r

Rohit

10/14/2020, 8:55 AM
Yeah I ran it but it stucks on same error @gildor
If possible then where I can see stacktrace logs ? @gildor
g

gildor

10/14/2020, 9:00 AM
add --stacktrace to gradle
the easiest way just build from command line
something like ./gradlew assembleDebug --stacktrace
so you should see full stacktrace in console\
yeah, just realized, you cannot build with studio, because it fails on project sync
k

KV

10/14/2020, 9:05 AM
Can you please download the gradle file and unzip that packages and after that as I attached the screenshot just change the path and sync the project. This will work
g

gildor

10/14/2020, 9:14 AM
Download the new gradle first and go to project setting and select the new gradle and after that sync the project
It’s not a very good advice, always use Gradle wrapper, do not use standarlone version of gradle. Also I don’t think that issue above related on version of Gradle, Android Gradle Plugin checks for minimal supported version already
k

KV

10/14/2020, 9:15 AM
Okay thanks for explaining 🙂
r

Rohit

10/14/2020, 9:20 AM
Will update through stacktrace logs
--stacktrace won't able to get logs, the build breaks with the same error
k

kqr

10/14/2020, 11:26 AM
I hope you have a reason not to use screenshots 🙂
r

Rohit

10/14/2020, 11:28 AM
Didn't get you! 😅 Put some light on it! @kqr
k

kqr

10/14/2020, 11:29 AM
sry just offtopic: why are you using your phone camera instead of doing screenshot on PC
r

Rohit

10/14/2020, 11:31 AM
Yeah I got you 😁 but Slack is too slow on my PC, At times it just freezes.
g

gildor

10/14/2020, 12:04 PM
please, build in command line
of course it’s the same error, as I mentioned above, it will not work from AS
use command line as I suggested above
r

Rohit

10/14/2020, 12:15 PM
Yeah all there was issue with Firebase Gradle plugin version, couldn't sync with latest Gradle version in AS 4.1. So, upgraded the Firebase stuff and Gradle build successful. Thank for the quick watch and help redressing it. @KV @gildor 🙂
👍 1
Couldn't get to the stacktrace logs as of Gradle break. So found similar issue on Google where one was able to show the stacktrace where it mentioned about those Firebase plugin incompatibility. So yeah thanks again to make up my mind search that relevant @gildor @KV
g

gildor

10/14/2020, 12:21 PM
Couldn’t get to the stacktrace logs as of Gradle break.
Why?
r

Rohit

10/14/2020, 12:43 PM
As I mentioned @gildor the Gradle build corrupted every time, it wouldn't even continue for atleast 5 seconds.
g

gildor

10/14/2020, 1:56 PM
it’s not a problem, if you just run build from commmand line it will print error stacktrace together with error message
r

Rohit

10/15/2020, 5:21 AM
@gildor So yeah I have again executed suggested task from terminal and it ran successfully and shown me the relevant issue causing the build to fail. So, it was the issue with Firebase plugin, wasn't able to sync with latest Gradle. Updated the plugin and build is successful and running. Thanks for handhold assistance. 🙂
👍 1