BlueScreen after Run emulator android studio - android-studio

When im run android studio, or run emulator for android studio with manually or with cmd, always get bluescreen.
it say "your pc ran into problem and needs to restart. we're just collecting some error info, and then we'll restart for you"
Stop code: IRQL Not Less or Equal
how can i fix it ?
im trying download another emulator and following tutorial on youtube, but it didn't work

It depends on various factor,
I happened to get this issue because of my old PC with Lesser RAM size(4GB) and to rectify it, I connected my Android phone to PC for debugging/running apps from Android Studio.
You need to enable USB Debugging in your phone for that purpose.
NOTE:
You can view this blog post I made, which addresses the same issue.
https://whysurfswim.com/2015/07/11/sick-of-your-avd-theres-a-alternate-for-it/

I had almost same problem. When I tried to install my app in emulator(Ram 8gb), my emulator crashes but kept running in background. As a result, I was unable to shut down my pc and have to disconnect power for shutting down.
use your phone for debugging your app. you can connect your phone using wifi. link here

Sometimes it happens beacause of outdated drivers, try updating your drivers to latest version, and update the windows 10 to latest version. Also try by deleteing your current emulator device and create new device by enabling software renderer. For lower end pcs like yours I would recommend to use real device instead of emulators ans use ssds for better performances.

Related

APK does not install and device is unauthorized and offline

I have a device running Android 6.0.1 and I'm working with Android Studio 2.3.3 on a Mac. When I try to install/run my application (hello world) I get this message.
com.android.ddmlib.AdbCommandRejectedException: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
Error while Installing APK
I know questions like this have been asked all over this site and I have looked though most of them and followed these suggestions
Turn everything off and on a few times
Ensure USB debugging in enabled in developer settings
Stop and start the adb server
Try a different deployment target, virtual devices work fine
My current theory is that my device is not authorized either because my device is not a phone/tablet/watch, it is just a SOM and carrier board.
My only other thought is that this is caused by the device being offline.
When I am selecting a deployment target I can see my device but it says [OFFLINE] beside it and it is slightly greyed out. I don't fully understand what this means given my device is connected the same network as my Mac they can ping each other.
So my question comes down to this
What other troubleshooting can I try?
Is it relevant that my device is offline/ what does that mean/ how can I go online?
The issue was with the .img file I used when getting the OS running on my device. I reinstalled the OS and everything worked after that.

Android Studio emulator keeps freezing, crashing, and is not responding at all

I'm a starting Android development and have recently ran into some problems. I don't know whether it is my hardware or if it's Android Studio but the emulator keeps freezing or is not responding.
The first 2 days Android Studio was running fine. However, after that it cannot run my apps. I reinstalled Android Studio and it worked for one day, but now even if I reinstall it, it won't run any apps and even Android Studio itself would occasionally freeze and I will have to restart it.
The emulator either does this or does not even turn on:
it won't even respond when I click on anything on the emulator
Here is a break down of what's been happening.
Day 1: works fine.
Day 2: Android Studio freezes multiple times when I launch the emulator. Emulator unresponsive to clicks. I uninstall Android Studio thrn install it again. After reinstallation it works 100% again with the same app
Day 3: emulator unresponsive, freezes. Menu bottons such as rotate screen, back etc. unresponsive.
Day 4: same as day 3. Uninstall Android, reinstall. Unresponsive.
You can try changing this line of code System.out.println(userinput1); to Log.d(MainActivity.class.getSimpleName(), userinput1) because on emulator system.out.println() automatically redirects to logcat but sometimes not.
This problem may arise due to low ram size, android studio works fine with 8GB Ram.Or try to config emulator properly. Let me know if problem continues.
I would suggest that import just specific address of class not the whole package or as bundle.
With
import java.util.*;
all classes of java.util package is imported.
The problem might be that, your hardware might be overwhelmed.
I don't think anything is wrong with your code. What is your system configuration? Does other applications work on emulator work? Can you post you
post your logcat?
PS: I know it should have been a comment. But I don't have permissions, sorry.
Problem and solution
Same problem, unusable for serious testing, whole system locking up regularly (Linux Mint Vera | 16GB-RAM | Nvidia GP106 [GeForce GTX 1060 3GB] -- worked fine on Windows 7, exact same hardware (although hard drive config has changed slightly, might need to double-check the OS drive is connected port0 on motherboard in case of performance impact).
It's ironic that Android being Linux based, struggles to run in a Linux env xD.
Tried different:
Linux APIs
Emulator Phone Models
Phone RAM specs, processor specs, etc
( All different graphics modes (both in native A-Studio emulator and using the apt install-google-emulator option for vanilla standalone (old school) version. Old school version runs better (standalone version).
Checked all microcode updates and drivers are in order. (Using Nvidia GP106 [GeForce GTX 1060 3GB]
System is up to date (apt)
Found the best options:
Performance Better: Restart Android Emulated Device with 'Cold Boot' option specified
or
Use Diff Emulator: Virtual Machine Manager / Virsh (KVM-QEMU)
or
Use Physical Device: With Android 11+ you can wifi pair.
With devices APIs lower than 11, there is no Wi-Fi pair feature so I found solution was to install termux on the handset I wanted to use for app testing, which gave me a standardish shell with apt pkg manager -- then I could install sshd and connect to dev-PC with portforward i.e
$ SSH from Phone to PC with: ssh -R 4444:127.0.0.1:5555 ubuntu#192.168.1.20
$ SSH from PC to Phone with: ssh -L 4444:127.0.0.1:5555 ubuntu#192.168.1.20
(The exact command may vary, written from memory as quick guide to get you moving right direction thought ports are correct, syntax may need adjusting and of course, the username#hostIP needs setting to your you-login#your-computers--LAN-IP).
Once an SSH connection has been established, which you can check using something like
$ ss -tulpan | grep 4444
or
$ netstat -tulpan | grep 4444
Once confirmed established, you need to fire up adb to connect to the now available Android adb service that we forwarded from the handset into the dev-PC by running the command (also make sure you have USB debugging enabled on the handset before doing this);
On dev-PC run;
$ adb connect 127.0.0.1:4444
It should say 'CONNECTED'.
Then to double check, run:
$ adb devices
Emulator should show up in Android Studio Device Manager. Give it a few minutes and Android Studio will pick it up!
I can't remember the specific reason I needed to do it this way as opposed to just connecting with a USB cable. I think I was doing some mad routed setup. But there we have it!
I found using a physical device to be the ultimate performance solution but is of course a bulky arrangement.
Update
Increasing memory available to Android Studio and the VM made big difference (I have 16gb RAM).
Android Studio > Help > Change Memory Settings (2048 -> 4096)
Android Studio > Help > Edit Custom VM Options > add/replace-->
(-Xmx4096m
(-Xmx4096m
(Then finally added extra config to Gradle script to allow extra memory but I don't think that would have an impact on the slow running issue as was entire emulator crumbling not just the app.)
In gradle.properties, replace order.gradle.jvmargs.... (with)
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
Finally, restart Android / Emulator and remember to do a COLD BOOT on your emulator device.

Is there a how to guide for testing livecode?

I have been trying for days to get a simple app any app made in livecode to display either on my tablet, smartphone or emulator. It just doesn't work. Here is what I have done:
I have installed my sdk and pointed livecode to it in preferences.
Picked 2.3 as my version
Check my google usb drivers and they are up to date.
I followed live code's step by step and no success. I am thinking that since I am running windows 7 not a Mac, maybe this cant be done. It seems all the developers run Mac's?
I even tried to make a .apk, It made the file but " There was a problem parsing the package" once I got it on my Galaxy tab. I made sure that I checked the box to allow programs to run on my tablet. So I am still stuck.
To see if the SDK is working correctly you could try to use the Android SDK emulator first.
Open the Android SDK Manager and select the menu Tools->Manage AVDs.
There you can create a virtual Android device and run it.
If the virtual device is running you can see the virtual device under "Development->Test Target in Livecode. Select it and either select "Test" under "Development" or press the "Test" button. Does this work?
That error message means that the operating system on your device is preventing the app from being installed. The most likely reason for this is that you haven't changed the "Allow installation of apps from Unknown Sources" setting on your Galaxy Tab. There are other reasons and solutions for this error message - to see them visit Panagiotis's excellent blog post on the LiveCode website, your error message is in the fifth example
https://livecode.com/how-to-deploy-apps-to-android-devices/

Windows phone 8.0 error 0x89371B01 when trying to deploy app

I cant find information on this error anywhere. I am connecting to a brand new lumia icon (AKA lumia 929). Dev account is registered. I have attempted:
reinstalling windows phone SDK
restarting phone
restarting computer
ensured the app runs on the emulators properly. the only required capability of this app is network. Capabilities have not been changed from the defaults since the project was created. none of the manifest xml files have been touched.
ensured phone software version is up to date
ensured apphub account is valid and active
ensured the windows phone developer registration tool worked, unregistered and re-registered the phone to make sure
restarting the "ip over usb" windows service thingy
changing the platform built target to ARM or AnyCpu (no difference, same error)
tried alternate deployment methods such as windows phone power tools (the xap deploy) and I get the same error when trying to connect (so I know it's not an issue with visual studio, nor is it an issue with the app code)
I can successfully deploy separate code to a separate WP7 device (so I know it's not an issue with the computer)
tried multiple usb ports
tried two separate laptops
tried visual studio 2013 and 2012
The behavior is this:
Connect the phone via usb and unlock it
Attempt to connect to phone via windows phone power tools OR deploy an app via visual studio
System hangs for about 90 seconds and seems to time out
Error appears
I am able to view the phone contents, name it and explore it on my laptop, but when it comes time to deploy something I am stuck.
Error message is simply: 0x89371B01
What does that mean? Has anyone else run into this?
Have you checked the device drivers on your Windows 8.1 machine? It could be a driver issue with your USB drivers on the computer.
I have also found that, once you get it connected, going into the Device Manager and deleting the device from there and forcing it to reload has helped me in the past.
Out of curiosity, try running "sfc /scannow" at a command prompt on the PC. It may require admin elevation. I've seen some bizarre behaviors due to dll problems in sxs in win 8.1, wondering if this could be caused by that kind of thing.
Couple of things to try:
Have you installed the GDR3 Emulators and tried running it on the 1080p emulator? It looks like the 929 is a 1920x1080 phone and will have the latest the latest updates installed. First place to check.
Based on this feedback in another stackoverflow question it looks like someone was having a similar issue and disabling Hyper-V resolved it for him. If you disable Hyper-V and it works, try re-enabling it and see if you still have the issue.
jmshapland had the correct answer for me, with the same issue. Disabling Hyper-V did the trick! No thanks to microsoft phone dev center forum posting on the issue..
http://social.msdn.microsoft.com/Forums/wpapps/en-US/24bd3e48-e7b4-4d00-8d69-193f49989ce0/0x89731b01-error-during-deploy-to-device?forum=wpdevelop
Looks like I'll be disabling Hyper-V to test on my device, and re-enabling to work in emulator mode:
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
and
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
OK I was able to come up with a repeatable solution for the issue. Im HOPING that by posting this I dont tempt fate and have the phone not work again!
Here are the steps I did to resolve it (not sure if all of them are necessary):
On phone, disable wireless
Connect phone to laptop
Open device manager and click to show ALL HIDDEN DEVICES (including hidden devices is important)
Uninstall ALL phone-related devices (one in portable devices, several in USB
devices) anything that mentions lumia must go
Disconnect/reboot phone
Reboot laptop (there seems to be a process keeping the port open)
I had connectivity, then I lost it, then I re-gained it using these steps and it seems to be reliable for me (so far)

Do I need a physical phone to test run the build from android source or can do it in emulator?

I am now downloading the android source code in ubuntu 10.10.
Just wanted to be sure that, I can build the OS from the source and test run it in the emulator just like any other Android application I run in emulator?
Thanks for your help.
You should be able to, since the emulator counts as a connected device.
BUT chances are it probably wont work on very many phones, if any. Since all the phones are slightly different.
For instance a droid rom wont load properly on my nexus one and vice versa.

Resources