Android Studio stuck at building gradle project info - android

I am using Android Studio 2.3 and whenever I try to create a new project or open some project, it gets stuck at this point "Building "******" Gradle project info" please suggest me some solution.

It is likely downloading Gradle zip file,
e.g: /Users/user****/.gradle/wrapper/dists/gradle-3.3-all/55gk2rcmfc6p2dg9u9ohc3hw9/gradle-3.3-all.zip.
you should manual download it or check network.

Download manually the stable version of gradle from gradle-X.X-all.zip
and extract into /Users/[yourUsername]/.gradle/wrapper/dists/gradle-x.x-all/55gk2rcmfc6p2dg9u9ohc3hw9/

you can download your gradle.x.zip and replace /Users/user****/.gradle/wrapper/dists/gradle-3.3-all/55gk2rcmfc6p2dg9u9ohc3hw9/gradle-3.3-all.zip

Related

Plugin error: kotlin-idea.jar contains invalid plugin descriptor

One day I oppened android studio and this poped out as "plugin error":
Plugin error: File '~\AppData\Roaming\Google\AndroidStudio2021.2\plugins\Kotlin\lib\kotlin-idea.jar' contains invalid plugin descriptor
How to fix this?
I went to Menu Tools > Kotlin > Configure Kotlin Plugin Updates in Android Studio. The dialog shows message A new Version 212-1.7.10-release-333-AS5457.46 is availible and an Update Button below the message. After Update and Restart the error was gone.
Download the newest version of Kotlin from here
then replace the Kotlin file in this directory with the one you downloaded "C:\Users\YOURUSERNAME\AppData\Roaming\Google\AndroidStudio2021.2\plugins"
I downloaded the newest plugin "Kotlin" from jetbrains site and error disappeared
https://plugins.jetbrains.com/plugin/6954-kotlin/versions/stable
I just deleted the file in that path. It seems everything worked normally afterward. (You may need to tick the "show hidden files, folder, or drives" from File Explorer Options if you can't find it directly)

Android Studio: Unable to build app due to gradle distribution url error

I know this question has been asked before but I haven't been able to fix the issue. I am running Android Studio version 3.1.4. I am trying to run an app that I cloned from a Github repository. But even before I try to run it, I get this error:
my-app: sync failed
Cause: https://downloads.gradle.org/distributions-snapshots/gradle-4.4-20171031235950+0000-all.zip
How do I fix this error? Thanks in advance.
You can check and change the distribution url in the properties file $rootDir/gradle/wrapper/gradle-wrapper.properties. See property distributionUrl.
Value should be something as follows (update the gradle version depending on your Android Studio version)
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
I've encountered a similar error when I tried importing the Sunshine project from the Udacity Android development course. I fixed the issue by downloading the mentioned zip file and extracted it to the C:\Users\<username>\.gradle\native folder.
Then in Gradle settings, use local Gradle distribution and set the Gradle home path to the downloaded gradle folder.
Check this video for more information
You can fix it by the following steps: (currently using Android 3.6.3)
This worked for me.
Exit android studio then make the below changes.
Go to C:\Users\UserName.android and rename the build-cache folder to build-cache.bak.
Go to C:\Users\UserName.AndroidStudio3.6\system and rename these folders:
caches to caches.bak
compiler to compiler.bak
compile-server to compile-server.bak
conversion to conversion.bak
external_build_system to external_build_system.bak
frameworks to frameworks.bak
gradle to gradle.bak
resource_folder_cache to resource_folder_cache.bak
Open the Android Studio and open your project again.
If the folder is not in the Android3.6 folder, move to the next step.
Find the Gradle version from the gradle-wrapper.properties file
Download the Gradle bin file from internet, then extract it.
File menu-->Settings-->Build & Tools-->Gradle-->Use Gradle from: From
drop down select a specified location and browse to the location
where you have saved the Gradle bin zip file. (Default settings is use from ;gradle-wrapper.properties' file)
4.File menu-->Invalidate caches and re-run
[Gradle properties file]
[Gradle settings]

Gradle connection timed out after update Android studio to 2.3

After I update android studio to 2.3, my old project is not opened in android studio shows me gradle error. And when I open a new project, that project is not build
After the new update of android studio (2.3) this is a common bug.But heres the best solution to this.Once you get a message as gradle sync failed,then its as because your gradle file got bug.
the solution is go to C:\Users\Admin.gradle\wrapper\dists\gradle-3.3-all\55gk2rcmfc6p2dg9u9ohc3hw9
here you can find a zip file : gradle-3.3-all.zip
delete all contents in that and download file from https://downloads.gradle.org/distributions/gradle-3.3-all.zip
paste this in 55gk2rcmfc6p2dg9u9ohc3hw9 folder. Then restart studio.It will be working perfectly.
If you have any other version of gradle you can find the corresponding file in https://services.gradle.org/distributions
I found it my self now, its very easy
Just need Edit "build.gradle.project" dependencies to 2.3.0 and edit file "gradle.wrapper.properties" , distributionUrl to "/gradle3.3-all.zip" and sync project

Android studio alway show "Gradle project sync in progress"

After update android studio Build number AI-141.1809159 version=1.2 in Canary update, i can't sync gradle project and always show "Gradle project sync in progress"
Following are the steps that I use (Kind a workaround),
Edit the root build.gradle file (adding a new line to file will also
do).
Save the file.
Restart the IDE (File->Invalid Cache/Restart->Just Restart).
Gradle Sync in progress notification should go away.
I found this was due to this plugin being used in AS:
'Android Studio Unit Test'
To disable this in AS 1.2 do the following:
File > Settings > Plugins > Android Studio Unit Test disable
Problem is solved, just update android sdk, it's work for me.
This happened to me twice and had to do with one of the gradle files having a date in the future (a glitch in Android Studio it seems). That is why just adding a space to the file and saving can fix the problem, as described above. Or go through your project with the operating system file explorer to find the file.
wait for some time, if you are using somebody else repo. It depends on the projects buildings. You might see new changes like file path, project-level dir appearing, etc.
Disable VPN if you have it active.

Android Studio Error - Unable to open PNG file

I am getting the error that is pictured above when I try to build my project in Android Studio.
The file that is mentioned in the error does not exist in that folder. I tried to delete the entire folder hoping it would re-download the needed file. It did re-download the folder but again it did not have that file.
I am not using this file anywhere in my project and as far as I know.
Any help would be greatly appreciated.
Thanks.
Maybe the path of file is too long that it is unable to process it. In my case, it was:
C:\Users\ber$erk-kAjU\Downloads\Compressed\android-xmpp-asmack-sample-master\android-xmpp-asmack-sample-master\XMPPAsmackSample\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.3\res\drawable-ldrtl-xxhdp
As you can see, it is huge! I just moved my project to another path, and reduced it to:
D:\AndroidStudioWorkspace\XMPPAsmackSample\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.3\res\drawable-ldrtl-xxhdp
Maybe this can help!
Use
Build > Clean Project
To clean the build directory.
I think you are using AppCompat library in your build.gradle file
dependencies {
compile 'com.android.support:appcompat-v7:+'
}
In order to use any support library in dependency make sure you have downloaded Android Support Repository from SDK manager
After downloading the repository, do sync the project with gradle using tiny gradle button available in toolbar.
After sync completion you will be able to see mentioned png file in directory as shown :
Inside the directory.
EDIT :
If still doesn't solve check the whether your sdk pointing to right sdk from File > Project Structure > Android SDK
Also check this Import Google Play Services library in Android Studio for AppCompat Library
If there is some issue make it correct ans sync project with gradle.

Categories

Resources