K Soze K Soze - 2 years ago 206
Android Question

Gradle Sync Issues / Android 2.3.3 / Gradle 2.3.3

I am working with react native, and I updated some packages. After that, Android Studio noticed me that I needed to update the Build Tools to sync the project. But I can't modify it, my files are in the read-only mode for no reason, and I do not know how to change that. Here what I see:

Gradle Sync Issues

Error: The SDK Build Tools revision (23.0.1) is too low for project
':app'. Minimum required is 25.0.0 Update Build Tools version and sync

Event Log

IncorrectOperationException: Cannot modify a read-only file 'path/android/app/build.gradle'.

And the other message on top of the screen

Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly.

I already saw that it was an issue from Android 1.X.X but the posts I read did not help me.

Thanks in advance.


I reinstalled Android Studio and the andrdoid SDK with no succes: got the same issue.

I forgot to say that I am on Ubuntu.


I tried 3 more methods :

  1. I deleted .gradle folder from the Android Studio folder then in Android Studio:

File >> Invalidate Caches / Restart >> close Android Studio >> Restart Android Studio (which automatically redownload gradle tools) >> Gradle Build

Same issue shows up.

  1. I deleted .gradle and gradle folder from the specific project's folder I am working on. Then in Android Studio:

File >> Settings >> Gradle >> check Offline work >> close Project >> re-open Project >> Gradle Build

Same issue shows up.

  1. Finally, I tried to use a local Gradle. I dowload latest Gradle version here: http://services.gradle.org/distributions/


I unzipped it and:

Fille >> Settings >> Gradle >> check Use local gradle distribution >> set Gradle home path >> Gradle build

Same issue shows up.

I would appreciate some help, thanks.

Answer Source

I went to the android/app folder of the project and I used the following command:

chmod 777 build.gradle

It removed the read-only mode by giving me all the rights.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download