Error collecting data in Android Studio

I updated to the latest version of the Android SDK and set JAVA_HOME to .bash_profile using export JAVA_HOME=$(/usr/libexec/java_home) and I get the following error:

 Error Gradle: FAILURE: Could not determine which tasks to execute. * What went wrong: Task 'assembleDebug' not found in project ':CrystalBall'. * Try: Run gradle tasks to get a list of available tasks. Error: Could not execute build using Gradle distribution http://services.gradle.org/distributions/gradle-1.6-bin.zip 

I added a screenshot:

Error screenshots

What should I do?

+6
source share
2 answers

The second error in the screenshot seems to me more important. You need to make sure that Android Studio can download and execute the gradle binary. If you are using a proxy server, you need to configure it in Android Studio.

To check gradle tasks, go to the project folder on the command line and enter "gradient tasks"

You can also configure the proxy for gradle. Just create a gradle.properties file in (your project folder) with these properties:

 systemProp.http.proxyHost=www.example.org systemProp.http.proxyPort=8080 systemProp.http.proxyUser=userid systemProp.http.proxyPassword=password systemProp.http.nonProxyHosts=*.nonproxy.com|localhost 
0
source

I do not believe that this is the problem that the poster had, but for others I will add what I found when I was helping someone in Windows XP who was getting the same error.

It seems that in his case, the problem was that there were gaps in the path to the Android Studio project (since the Windows Documents and Settings directory is used in Windows XP). I made him create a new project in the catalog without spaces in it, and he built and ran without problems. Perhaps there was actually something else, but as usual, it is better to avoid spaces in the tracks.

0
source

Source: https://habr.com/ru/post/946467/


All Articles