0

I just install android studio in my ubuntu 16.04 gnome, then i try to create a new project but it stucks at the gradle build.. The Gradle Message says :

Information:Gradle tasks [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources]

You can see the screen shoot here. So, how to fix it?

zihadrizkyef
  • 1,849
  • 3
  • 23
  • 46

1 Answers1

1

I don't use ubuntu or know the answer but these links seem to be dealing with the same issue:

1) How to fix Android Studio getting stuck executing Gradle tasks?

The solution to this one was to install libz.so.1 and you can find installation instructions here: libz.so.1: cannot open shared object file

2) I can't build project in Android Studio on Ubuntu. Gradle running build takes infinity

The solution to the second one was to use these two commands in Terminal:

sudo dpkg --add-architecture i386

sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386

3) Android Studio gradle takes too long to build

I'm not sure the third link is as relevant, as it solves the problem of gradle builds taking a long time, not the problem of gradle builds getting stuck, but it still may be helpful information.

The solution to the third link was to go to:

In Android Studio go to File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle

Check the 'Offline work' under 'Global Gradle settings'

https://i.stack.imgur.com/vX0Or.png

Community
  • 1
  • 1
Jon
  • 2,907
  • 1
  • 12
  • 9