I'm on Windows. I created a new project on Android Studio for Marshmallow at least.
The only thing I've done so far is generating the main activity which is a tabbed activity with view pager. Also, you should know that this project is a private git repo that I cloned.
I'm working on this project with another developer and the project is perfectly working on his side.
The problem is:
When I try to launch the app (wether it is a virtual device or my real phone), the gradle build gets stuck at the app:processDebugResources step. I waited more than an hour and nothing happened. Moreover, when I want to cancel the gradle build, it doesn't respond and I have to kill Android Studio process. Then I restart Android Studio and I have to kill a gradle process that prevents the initial gradle build (at Android Studio startup) from working.
The crazy thing is that I was able to launch the app before. I even installed it on my phone!
What I've tried so far:
Do what stackoverflow was giving as solutions like tick the offline mode in the settings
Create a new project --> It doesn't change anything
Reinstall Android Studio --> It doesn't change anything
Deactivating Avast antivirus
Invalidate cache/restart + Clean + rebuild (the rebuild gets stuck like when I try to launch the app)
And maybe other solutions that I forgot...
It's getting very annoying as it's making me lose days of development.
If you have any more solutions, or if you think I should try again some of the previous solutions, help would be greatly appreciated !
I know this is an old post, but I faced the same problem during the last few days and since i got crazy I hope I can help someone else out there.
After many hours of troubleshooting I found that the Java Platform SE binary executable goes in "suspended mode" in Windows 10, preventing Android Studio from compiling (it hangs at app:processDebugResources).
Example Screenshot
Killing the suspended process and recompiling the project works just fine... until Java gets suspended again.
Maybe your gradle version is not compatible with it. Try again with latest version of gradle in your project.
I did several things:
Install NDK
Change JDK from embedded one to Jdk 8
Redownload SDK i was using (6,7,8)
And now the problem is solved ! I have no idea which of these things made the tricks but I'm happy ! It may be useful to someone else one day.
Related
After creating a new Flutter Project in VSCode/Android Studio, there are just no code suggestions. Pressing ctrl+space usually brought up suggestions in both, but now on Android Studio it says no suggestions, and on VSCode I get the usual few snippets, no IntelliSense.
Weird thing is when I tried reopening previous projects, some projects are still fine, some projects have the same issue. I have attached screenshots of when it works, and when it doesn't
PS: I'm not sure if this is related but in VSCode just when a new project is made it fails to recognise the header file so it highlights everything as Error though the code runs fine. However this gets fixed when the window is reloaded
This usually happens when your IDE is not sync with the version of Dart and/or Flutter used in the project ; that's why on some projects it still works, and not on the other.
Option 1 :
Try to update your Dart/Flutter version on the project, and on the plugin/extension of the IDE. Watch out to have the last version of your IDE, not on beta channel, as well.
Option 2 :
If still not working after the update, delete IDE related files in problematic projects and reopen them.
Last time worked for me, hope it will for you !
i'm trying to install my app debug from my android studio. it's work well yesterday, but today when i try to install it again, the application cant be installed on my device and showing error like below on my android studio.
Installation did not succeed.
The application could not be installed: SHELL_UNRESPONSIVE
The device timed out while trying to install the application.
Retry
what should i do? i tried install on other device, and it worked fine. My device is Redmi 4X and other device is Samsung J3
Faced the same issue, not sure of the reason but in Android studio, Click on the File -> Invalidate Caches/ Restart and then it starts to work.
I got same issue with my device. i restart my device and its work properly.
The problem is because you don't have the proper SDK for the Android version. I'm telling you because a month has passed for me too. The solution is to download the appropriate pack in the SDK Manager.
If you have doubts how to enter:
Close the project.
In the welcome panel click on settings, then choose the SDK Manager option.
Click show package details and select the version for Android and choose all packages.
Finally you click ok XD
Try this method if it works perfect greetings
If other answers didn't help and previously application was installing correctly on your device, try to check your AndroidManifest file. Check that nothing forbids to install your app because of os version conflict or manifest merging errors or other reasons.
I came across this problem recently, through process of elimination I determined the cause was related to dependencies in the build.gradle(your app name).
I suggest working backwards and comment out everything that was added since the last known working build/install.
In my case I have a legacy app developed back in 2016 being rewritten, dependencies for signalR have changed quite a bit since then, the original libs where causing the install to fail while everything else seemed excellent, not even a single build error was occurring. Commenting out the libs and references got the application to a runnable state.
In my case, I deleted the emulator and recreated it. It solved the issue.
Before this, I had already tried following which did not work for me:
From menu: File->Invalidate cache/restart.
Deleting .cxx, .idea, .gradle, build folders and rebuilding.
Cold boot device emulator
Posting this in case someone is trapped in my kind of situation.
For 2 days I can't start coding my first android app, because of an issue with Android Studio 2.3.1.
There is many discussions about that out there, but non of them helped me so far.
I'm not able to use Run button for my app or even to edit the main_activity.xml file in the program window. Also the following error occurs when Android Studio starts running.
Screen shot of the error:
I'm workin' on Windows 7, 64bit, 8gb RAM, Java 1.8.0.121. Installed Android Studio 2.3.1 using android-studio-bundle-162.3871768-windows.exe file with no custom settings.
To solve the problem I've tried:
reinstall Android Studio
remove .gradle catalog
use File>>Invalidate Crashes/Restart
nothing helps.
Problem solved!
In my particular case the problem was caused by uncomplete Android Studio installation.
The reason of such an installation was Comodo AntiVirus
I noticed that there was some .bat files blocked during the installation. Comodo doesn't inform about it, but you can check it on blocked features list.
So I removed completely Android Studio, turned off all blocking functions in Comodo and quited it. Then installed AS once again.
Now it works fine. Ad least so far... Luckilly there's no Gradle error, so I hope there won't occur further problems.
Hope that this tip's gonna be helpful to somebody.
Have a good day folks!
I download the latest Android Studio 2.0 from Android Develop Website.
But when I change a line of code and use the "instant run", instead of updating the changes, it prompt me "no changes to deploy".
This will happen on code changes and XML changes.
But when I restart Android Studio, things will works fine for once or twice and then "no changes to deploy" Come again!
I used my old SDK on Android Studio older version.
JDK is 1.7.0
Windows7 64
So, is anyone has this same bug?
A lot of people are having this issue as Instant Run is still quite buggy. The best thing to do would be to disable Instant Run entirely by Preferences > Build, Execution, Deployment > Instant Run > Enable Instant Run
Solved by rebuilding Project (menu Build -> Rebuild project)
This sounds like a bug. It would be super helpful to our team if you can report the bug with specific repro steps so we can investigate. Without your help, it's going to be very difficult for us to track down these problems. We want Instant Run to work for you.
You can file a bug at this link: https://code.google.com/p/android/issues/entry?template=Android%20Studio%20Instant%20Run%20Bug
Also having this issue with Android Studio 2.1. Turning off Instant Run seems to have fixed it, which is unfortunate, but I was wasting more time failing to understand why old code was being run than Instant Run was saving me! Running Ubuntu, so agree not just a Windows bug.
Run TAB next to anroid-monitor, sometimes it shows, no changes to deploy mean changes in code has not been added to your app(this bug has been resolved to a great extent).
Sometimes it runs the new app and when you restart your app it shows the old one(this bug has been resolved, officially declared on android site ).
Solution :
Disable instant run under your project settings(you can face some error while gradle build if you switch from instant-Run to normal one then Try clean option or if still there's an error then you can delete those files at the path shown by the error)
Try to use the latest studio release which has totally improved
instant-run.
Not a solution but as a better workaround I'd prefer to:
Press "Recent Apps"
Simply close my app from the list
Run the app again
This takes less time than Clean and Rebuild.
Update:
Rerun the app also works:
When Instant Run does not works correctly:
As far as I realized, Instant Run works properly when I change my views ids otherwise it does't recognise changes in xml and gives me "No changes to deploy"
I also used clean and rerun app or Cntrl+F5 this fix my problem
I have downloaded latest adt bundle for mac from android developers website. I do create a library project connected to main project and suddenly, Eclipse started to nag! I checked the build progress and I figured out that build process restarts at 40-50%.
I have captured a screenshot:
Some people suggested to disable Build Automatically. After doing this, the project builds and runs OK but I have to build manually after every little change and it's boring.
I am using Eclipse IDE for android Developers version 23.0.2.1259578.
Android SDK Manager details:
What is the cause of this misbehavior? What is a good solution? Any idea?
This was my solution for this issue I have posted a few month ago,
https://stackoverflow.com/a/24631434/2970351
Also try other solution in that page if it didn't work for you.