I am facing this issue for quite long time.
Creating a small android app
Whenever I try to run my Activity.java file in Android,emulator opens. After that I keep seeing this message as "Waiting for the target device to come online" for around 10 minutes. After that,when the gradle build gets finished, emulator stays as it is and app is not loaded or visible in the emulator.
This has happened to me many times and I failed to resolve this as I don't see any error message when gradle build is finished.
Any help is much appreciated. I have an assignment lined up to be completed in 2 days. Please help
Thanks,
Related
I have just started android and I created an app that was running fine a few days ago now I am working on another app but I am not able to run that and now I’m not even able to run the previous one.
now it's just showing Waiting for all the target devices to come online
and then it says Gradle build finished in 830ms or like that!
now it's just showing Waiting for all the target devices to come
online
To solve this-
Go to Device Manager>> Virtual and select launch AVD or from options select cold boot now.
Like Zobaer says, if it says waiting for devices that usually means the build has completed (you can check that in the Build panel) and it's waiting for the emulator to show up. If your emulator is already running, try closing it and running the app again. Otherwise if it's not getting started, try starting it yourself.
I'm just posting an answer to point out that you sometimes do need to be online for Gradle to run, but you can put it in offline mode:
That button in the popout panel, or you can always do Ctrl+Shift+A as usual and start typing what you're looking for!
I downloaded the Pixel emulator and Android API 25, but when running it
appears for a few seconds and then disappears
In the Event Log, this is what appears
I need help pls
The same Problem got me a few months ago:
I fixed it by doing this:
Whenever you run the project or app you have to clear the data of that AVD
To wipe the data of Emulator follow these steps-
Go To AVD Manager then you will see all emulators there then simply wipe data. ie- like in this image shown.
step 1
step 2
step 3
I also had random emulator crashes, everything would work for a short while, but then the emulator would just disappear as if it had stopped. The emulator.exe would still be running task manager, no way to recover the window and the .lock file couldn't be removed.
Even just starting the emulator and swiping the home screen left and right (not even starting my app), or going into the the apps drawer and back would cause the the emulator to stop working properly.
What worked for me was to always start Android Studio as "Run as administrator". So right click on the startmenu shortcut and select Run as administrator.
Not sure why it randomly stops working otherwise, I'm sure the Android Studio QA team thoroughly tests this on real-world laptops outside of Google labs right...? /s
im currently building a digital signage app, which is running on displays which are based on android 7.*. Everything is working perfectly, except a weird OS behavior:
After a while (6-9h) of running the app, android minimizes my application, i don't get any error logs nor do i get a exception thrown.
My workaround solution is that im reopening the app every 2 hours, this is working fine, but its not what it should be.
I already tried it with WakeLock, Keep alive, Kiosk Mode, nothing seems to be working.
Does anyone have a idea how i could solve this android behavior?
I am getting pretty frustratet. PLS help :)
I'm using Android studio 3.4.1 on Windows 10 x64 and I'm constantly getting same error over and over.
I can't run the app, because "MainActivity is not declared in AndroidManifest.json", and all code that uses something that requires permissions (NFC, read/write files, atc.) is marked as error, and the message is claiming that the permission is also missing in manifest.
These errors can be simply solved by Syncing grande files, as stated in this question: The activity 'MainActivity' is not declared in AndroidManifest.xml
However, after few minutes, these errors are back there again!
I've tried restarting the IDE many times, invalidating caches, syncing gradle many times...
But nothing helps. I got these errors, I sync gradle, errors are gone, I run the app, make tiny changes in code (like changing string in setText or changing textview margin), try to run it again, and the error is back. I sync gradle again, error is solved, I run the app, then I leave the IDE, Google something, and when I return to the IDE, the error is again back, even if no changes were made to the code.
I tried to Google this issue, but I was only able to find questions where this happend once.
Obviously there something that makes the Android Studio "forget" manifest every few minutes. The issue started to occur after my computer once lost power and shut down, so my first idea was corrupted files (as it could have happend while Android Studio was saving something), but if I ran the app after grande sync, it works fine, and it lasts few minutes before the errors are there back again.
So, as this issue happening once has been asked many times about, and many times there were different replies, I just started trying other suggestions.
I came acros this reply: https://stackoverflow.com/a/52687462/6357453
which suggests deleting folders with cache and other stuff Android Studio has created. I did and as of now, it's been more than an hour without this error, so this propably solved the issue.
I was using Eclipse this morning and it was working fine, both it and the AVD would load in less than a minute... After a few hours it started crashing.
Now if I'm lucky enough for Eclipse to load without crashing the AVD takes at least half an hour to go from the basic "ANDROID" text to the actual logo.
I've tried cleaning my project, recreating the AVD, increasing the AVD's memory from 256mB to 1024, disabling animations and loading from snapshots...
Other than using Eclipse the only thing I have done with my computer is searching on stackoverflow.
What could have caused such a change in performance over a few hours?
Maybe you started a background application or something. Restart your machine. Your memory is probably being barraged somewhere. Check that the processor isn't on battery save mode or anything.
Also, perhaps this post might help.