I just started with Android development and installed Android Studio 1.4.1. Everything installed correctly and no errors were shown.
When I was just about to write the first lines of code Android Studio started to act really weird, like when I moved my mouse over the opened files it started to render/draw the code all over (Example, Example 2).
The weird thing is, this happens all the time after I ran Android Studio for like 2-3 minutes.
Does anyone have an idea why this is happening?
I don't know if this is still relevant but I fixed by disabling the "animate windows" Option in the setting:
Try adding "sun.java2d.d3d=false" to "Android Studio\bin\idea.properties". This worked for me.
See here: Android Studio is having a strange "cascading display" glitch?
Try
File -> Invalidate Cahses/Restart
hope it will helps
or you can try another way like this
https://stackoverflow.com/a/58214439/11404883
Related
I did not change anything in my code, nor in the grade file, but I clicked on the update gradle notification android studio gets from time to time. I am not sure what the problem is but suddenly the IDE does not recognize some functions anymore, like String methods
also this icon changed:
My old project runs, but when I create a new project it won't work it says:
Error running 'app': Default Activity not found.
Help would be much appreciated.
I had the same issue I tried closing android down and restarted it up again and it started working, couldn't tell you why it happened though.
Try cleaning your project and rebuilding it from the Build Option. I have experienced this a lot of time as well. This works for me. As to why it works, I am not sure it. Hopefully someone would soon pitch in.
Go to C:\Users\{user}\.AndroidStudio4.0\system
and delete the caches folder.
Tried a lot of things I found online, but only this worked.
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.
this is so annoying.
Yesterday, everything worked fine. I commited my work on my app and went to bed.
Today- nothing works.
I try to debug my program, the app installs on my phone and works but the debugging stops only with: Unable to start program "The system cannot find the file specified".
No matter how ofter I rebuild, set my project as start project, change the target api, or what not. I even updated everything on my computer but it is hopeless.
Please, help me :(
This looks like a promising solution for this issue but somehow it didnt work for me, so I tried to repair my Visual Studio 17 and it worked.
For repairing visual studio you have to download visual studio installer from official microsoft website
If VS is already installed in your machine you'll get a screen with options :- Update, Launch and more.
select more and click repair.
You have to wait until VS finishes repairing. Hope you'll get rid of this annoying issue.
I had a similar issue, and solved it like this:
As Luminous_Dev figured out here:
forums.xamarin.com/discussion/123640/xamlctask-error-on-new-cross-plat-solution
make sure Mono Debugging for Visual Studio is enabled.
Tools > Extensions and Updates> Mono Debugging for Visual Studio
Source: https://forums.xamarin.com/discussion/123611/unable-to-start-debugging-the-system-cannot-find-the-file-specified
make sure Mono Debugging for Visual Studio is enabled.
Tools > Extensions and Updates> Mono Debugging for Visual Studio
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.
Since yesterday, my android studio emulators don't start. It was just after i updated Android Studio Library, i don't know if it is just a coïncidence.
What happens when i press start is:
The emulator command is executed
I see emulator.exe process in windows task manager, but no window is opened
Before that, the emulators started just fine, i had no problems, so it shouldn't be hardware issues.
I tried to launch it from the command line, to see if there were errors, but there's nothing. I also checked android studio's logs but still nothing... I also reinstalled completely android studio with no effects. I also tried to let it run for awhile but nothing appears.
Does anyone have a clue about what could cause this ?
EDIT :
It was a known issue (GPU related) of the SDK Tools 25.1.1 , it has been updated about 5 days later and now it works perfectly.
I had exactly the same issue.
Removing C:Windows\System32\Wbem from system PATH variable helps me:
https://stackoverflow.com/a/36650430/1901621