After clicking on the Android Studio link to Update Gradle I get this error: Error running android: Gradle project sync failed. Please fix your project and try again.

After clicking on the Android Studio link to update Gradle, I get this Ubuntu Linux message:

The file '/home/anne/Downloads/builder-3.2.0-alpha04.jar' is not marked as executable. If this was downloaded or copied from an untrusted source, it may be dangerous to run. For more details, read about the executable bit.

Then I had an error running attempting to run my Android app in Android Studio:

"Gradle project sync failed. Please fix your project and try again."

A search on Google found this page:

https://stackoverflow.com/questions/29808199/error-running-android-gradle-project-sync-failed-please-fix-your-project-and-t

suggesting this:

  1. Goto File -> Invalidate caches / Restart
  2. Shutdown Android Studio
  3. Rename/remove .gradle folder in the user home directory
  4. Restart Android Studio (It will download gradle metadata and data)
  5. Gradle build succeed
  6. Rebuild project. Done.

I just performed #1 and it worked, but read the full page of suggestions as there are a few to solve this problem including this one:

Resolution is simple. Open the "Android SDK Manager", update all packages and then restart your Android Studio. After that you project should compile without any issues.

If you are running Android Studio on a 64-bit Linux machine, you may need to install some specific libraries, as follows.

https://developer.android.com/studio/troubleshoot.html#project_sync_issues

If you are running Android Studio on a 64-bit Linux machine, you may need to install some specific libraries, as follows.

If you are running a 64-bit version of Ubuntu, you need to install some 32-bit libraries with the following command:

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 lib32bz2-1.0

Ubuntu Linux System Requirements for Android Studio specify the Gnome desktop environment (not Unity)

I’ve been using Ubuntu Linux 17.10 on a Dell desktop and a Dell Inspiron 15R laptop using the Unity desktop environment. However, I noted the Android Studio system requirements for a Linux machine specifies the Gnome or KDE Desktop Environment (DE) and does not specify Unity:

https://developer.android.com/studio/index.html#Requirements

I did a Google search and can’t find any other documents referring to Linux desktop version and Android Studio. I went into the Gnome¬† DE and started up the Android Studio (version 2 and version 3) I’d installed using Unity and both started up in the same manner as they start up on Unity. You can switch between the desktop environments on a Ubuntu Linux machine when you first log in – look for the settings (machine cog) icon.

If Gnome is recommended, this may explain some glitches if you’re using Unity. Unity will be dropped in the not too distant future – see bottom link.

https://lifehacker.com/5853099/linux-desktop-faceoff-gnome-3-vs-ubuntu-unity

Reading the above about the differences in desktop environments, I gleened that Gnome is a cleaner leaner environment and Unity has some bloat and is slower – but the ease of use of Unity and being familiar with it has won out for now. But I will start to use the Gnome environment – see below…

Ubuntu 18.04 To Ship with GNOME Desktop, Not Unity