Restart Gradle without restarting Android Studio - java

Restarting Gradle when android studio shows that I have errors fixes them sometimes. Is it possible to restart Gradle without restarting android studio as it takes a while for it to load on my machine.

You can write the following onto the terminal tab in android studio:
gradlew --stop
After it executes successfuly it can take some few seconds to take effect (not more than a minute). The point is that it'll have to end the current task it'll be processing at that moment. If the task is frozen this command won't work.
As you already might know you can find all the tasks being processing at gradle console tab in android studio.

Related

Cannot use connection to Gradle distribution 'xxxx' as it has been stopped

so I have never had this happen before, I am trying to load a gradle project in IntelliJ idea, but I keep getting this following error.
Cannot use connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-3.0-bin.zip' as it has been stopped.
Here is the logs of the gradle process
Download https://services.gradle.org/distributions/gradle-3.0-bin.zip finished, took 14 s 732 ms (69.3 MB)
7:49:01 AM: Execution finished 'wrapper'.
Could not find anything on google that was useful.
When it says "Cannot use connection to Gradle distribution 'xxxx' as it has been stopped" I simply closed the project, quit android studio, and then relaunched Android Studio and opened the project and it worked, i.e., Gradle was not stopped and I could continue.

Unusable project in Android Studio

I have been working on an app for 2 years, 1 month ago I stopped updating it to focus on other things and today I wanted to resume the project. The last time I made changes it was working fine. Today I opened Android Studio and without making changes I tried to run my app on the device that I always use for testing but never compiled, I received "Read time out", Restart Android Studio and now all the classes in the app appear with errors that do not exist (context and type errors: cannot resolve method, cannot find symbol),I have tried using the options:
Invalidate caches / restart
Clean project
Rebuilt project
But the problem continues, I am not attaching code because it is not a programming error, I assume it is from Android Studio... I have no idea what could happen or how to solve it, I will appreciate every answer
Try deleting .gradle and .idea folders of the project. Then open the Android Studio and clean and rebuild the project again.
If the problem persist try checking the android dependencies and see which one is creating the problem.

Gradle: download gradle takes "very long time", activity_main.xml keeps showing "Loading"

I have installed Android Studio today. I'm a newbie to Android development. I know that it has been asked several times, but my Android Studio is most updated as of now, so none of the solution seems to work. [AndroidStudio v3.6]
After the installation got over, I attempted to create an Empty Project. It opened the whole project as seen below,
After waiting for 7+ minutes (bottom-left), gradle is still not downloaded, and the activity_main.xml file keeps showing "Loading".
Solution 1 - Change the gradle location
I found this location to C:\Users\RAHUL.LAPTOP-DISIIAS2\.gradle\wrapper\dists\gradle-5.6.4-all\ankdp27end7byghfw1q2sw75f, but it contains two files - one is gradle-5.6.4-all.zip.part and other is gradle-5.6.4-all.zip.lck file.
Solution 2 - Invalidate and restart
Doesn't seem to work
Solution 3 - Change gradle settings to work in offline mode
The version I'm using doesn't have the option
How can I fix it?
Here is my gradle-wrapper.properties file:
First, check if you are connected to http\://services.gradle.org/distributions with ping command in Command Prompt. If you are connected, then change Proxy Settings in Android Studio to Use System Proxy. If it is downloading slowly again, your internet connection may be slow. Or you best fallow guidelines in this link : Gradle Download: Installing Manually
Then work in offline mode will appear in your settings.

android studio wont install app with code android.os.Binder.execTransact(Binder.java:697

After a little of playing with java codes in android studio, suddenly it stopped installing apps on avd. I can have the apk output and install it on my phone(there I get the play protect error of unconfirmed developer ) as I disabled play protect on my avd. I have no idea what the problem is.
every time I try to do that android studio retries to uninstall the app from avd and the app is not on the apps list of avd device the error code is this:
Unknown failure (at android.os.Binder.execTransact(Binder.java:697))
I have done the solution on this post but it didn't help.
this post:https://stackoverflow.com/questions/44202530/error-unknown-failure-at-android-os-binder-exectransactbinder-java565-error
Edit
another error raised:
error pic
the problem was that with the ioutils that i was adding on dependencies some how made compatibility problem with the system cpu (the problem that i didn't have on my android phone)so next time it happens to any one first check your dependencies by going to:
File -> project structure -> dependencies tab
delete any unusually item there that did the trick for me
Note That it may make your app to act abnormally

Android studio random freezes after fresh install

I'm quite new to the Android Studio IDE however I simply cannot get it to work. After launching studio, it'll only take me interacting with the GUI to freeze the entire program, with the only way to close it being to end the process via task manager. I have no idea what the problem is, I have jdk 8 installed with the correct path and its a brand new installation (yes I've tried reinstalling). I've included my thread dumps if that helps:
https://drive.google.com/file/d/0B1Fi84lOZ2nIYk13dDBtMXB1akk/view?usp=sharing

Categories

Resources