Cannot build an Android app with Gradle, except with sudo Cannot build an Android app with Gradle, except with sudo unix unix

Cannot build an Android app with Gradle, except with sudo


Taking a shot in the dark here, you may have run your initial gradle build with sudo which may have caused the artifacts to be downloaded and permisionned to root and are not accessible to your regular user. To test this assumption you may want to rename your local repository where gradle downloads the dependencies and rerun gradle as the standard user.


if you get the similar "cannot resolve symbol" appcompatactivity but running as sudo resolves things, try deleting the .AndroidStudio folder in your /home directory