Enabling Hardware Acceleration for Android Studio - java

It's my first time looking at android studio and I came across a problem when trying to run my first app. I get this error:
I have tried to navigate to here to install it but I don't have a folder named intel for some reason:
USERNAME}\AppData\Local\Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager
I have also disabled enable hardware-assisted virtualization In avast because I read online that it can cause some issues when installing it.
Anyone know why I cant find the file to install it or know an alternative way of doing so?
Edit 1: I'm running x64bit windows 10 and trying to run my apps on Nexus 5 if that has any help.
Edit 2: I have now got the Intel folder and have the exe I need to install it but I get this error now:
When I check my bios however, it is enabled.

You have not downloaded HAXM with the SDK Manager. Start the SDK Manager and install it.

Related

android studio Launching 'app' on No Devices - The app is unable to install

I ran my app few times on my physical device, and it wroked perfectly. Now i'm trying to run the app on virtual device. Not showing any issues in every time, but the app was not installed on the virtual device. I want to emphasize that it worked before I tried on the physical device. When i press the "Run" window, it shows a message: "Launching 'app' on No Devices".
Then i tried to delet all the virtual devices and set new devices. Still the same message.
How can i fix it?
I also faced this issue. I wiped out data from AVD manager and it is working fine after wiping out data.
In my opinion, Android Studio has a problem in detecting virtual devices! check the AVD Manager window again, and also, check the module you want to run, then restart Android Studio.
Free up some space in the Avd folder. Delete unnecessary virtual devices, which might take LOT'S of space. You can also free up some space in general in drive.
Make sure Intel x86 Emulator Accelerator is installed
Make sure that the needed SDK is installed (for the virtual device you're using). Just see that the API of that virtual device is installed in: File -> Settings -> Appearance & Behavior -> System Settings -> Android SDK
Try quiting the emulator. Then in AVD Manager under your problem device click on the down triangle in Actions column and select 'Cold Boot Now'.
Running Android Studio 4.1.2, and this still seems to be an issue from time to time.
I found that running adb kill-server solved my issue, rather than the other suggestions here. No need to wipe data, cold boot, or restart Android Studio.
Do three things
check the Android virtual devicve (AVD) is installed . file-> setting ->appearance and behavior -> android sdk
Check the installed andoid is only used while running . I had installed android11 but my AVD was running noughat7.1.1
Wipe out data from AVD manager . Dont worry only temp memory will be vacated n no any installed sw will go.
After doing this mine problem of
"running on no device " is gone . Enjoy

Android Studio - pushing app to phone, won't let me

EDIT: running Windows 8.1
Fully up-to-date Android Studio detects the phone (rooted Samsung Note 3 on 5.1). It's compatible. Developer Mode is active, USB debugging on, etc. Never had a problem connecting the phone for dragging and dropping.
However, whenever I try to put it on the phone...
Installation failed with message null.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application? (YES / NO)
No matter whether I press yes or no, I will get the same error.
Target device: samsung-sm_n920t-93eb26a9
Installing APK: C:\Users\user\AndroidStudioProjects\CopySunshine\app\build\outputs\apk\app-debug.apk
Uploading file to: /data/local/tmp/com.sdg.copysunshine
Installing com.sdg.copysunshine
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.fox.pac"
pkg: /data/local/tmp/com.fox.pac
Error: java.lang.SecurityException: Neither user 2000 nor current process has android.permission.INSTALL_PACKAGES.
DEVICE SHELL COMMAND: pm uninstall com.fox.pac
I can use emulators (like Genymotion) just fine, it's just that having Android Studio / Emulators make my computer run hot at times, so I'd rather not do it if I can...
A solution I've tried is putting "android.permission.INSTALL_PACKAGES." into the Manifest but then I get a message that only system apps have that privilege.
I have another phone, a rooted S4 that running on 4.4.2. but whenever I connect that, the phone's UI crashes completely... that's a whole different issue.
Not sure if this is the problem, but make sure you have installed Samsung Kies, available here:
http://www.samsung.com/uk/support/usefulsoftware/KIES/
Without it you will not be able to run your Android Studio apps on Samsung devices.
First off, some rooting techniques screw a few things up so it could be that the root caused the problem.
Nonetheless, could you include which OS you are running Android Studio on?
Did you get the promt to authenticate. Maybe revoke authentocation from the developer options and try again.
I had the same problem one day and I solved it by reinstalling drivers on my computer for the device. Then when I run as administrator I am able to deploy my application without any problems.
Also try to uninstall the app from the command line.
~ adb uninstall com.yourpackagename
A few other commands to check if everything works:
~ adb devices
~ adb install com.yourpackagename

Android Studio stopped working properly for me

I installed some new virus protection and removed the one from my laptop. As I had to restart my laptop so that the updates could take effect, It would not restart properly. I ended up having to refresh my laptop to a previous time so that I could once again access my files. I am now downloading the files that I once had, but Android Studio is not allowing me to run the applications that I am trying to test out. I tried to include a screenshot of the issue but I don't have the reputation to do so. The error reads:
Failed to complete Gradle execution.
Cause:
Supplied javaHome is not a valid folder. You supplied: C:\Program Files\Java\jdk1.7.0_71
I've tried changing where JAVA_HOME was pointed to but I am still not getting the proper functionality from Android Studio.
Try to install JDK and JRE for x64 and x86 as well.

HAXM is installed but emulator not running

I recently upgraded my CPU from core2duo E4600 to E6550. E6550 is supports virtualization. Then i install HAXM intel hardware acceleration manager.Installation was successful. People on youtube and many other sites says it fast the emulator but in my case my emulator is not even starting.. I have this configuration of device
AVD doesn't even show that "A valid android virtual device" in the bottom... it shows two options only
Please suggest me... how to run my emulator.. i have searched a lot.
You need to use an x86 system image like this one:
You can download x86 images in the SDK manager (the one shown contains Google Play which is a bonus if you need to have it on your emulator).
The "errors" at the bottom of your window aren't errors. What you're seeing is a poorly designed key for what any icons that appear next to your devices may mean.
Do you perhaps need to create, not edit, an AVD?
Try increasing the memory used by HAXM.
You can find the guidelines in Configuring VM Acceleration on Windows section of this page: http://developer.android.com/tools/devices/emulator.html
Check the version of andoid studio you have installed is it lower than what the render supports?
Because I also had the same issue and what solved it was just uninstalling the android studio I initally installed and installing the one that was compatible version wise.
My Old Installation that didn't work despite all my efforts, thinking my installed haxm was faulty or not working was
android-studio-bundle-141.2456560-windows
So I uninstalled the above and installed the one below before it started working.
android-studio-bundle-141.2117773-windows
Not really sure why that solved it even though the one i uninstalled seems to be more recent than that of the previous one. But that solved it and so it seems there are version compatibility issues.
Hope that helps.
Download the HAXM installer on the intel website and install
https://github.com/intel/haxm/releases
Windows
Run the haxm-7.6.6-setup.exe to install HAXM
Mac OS
I am not quite sure.

Android 1.5 sdk Android Virtual Device emulator errors Java Eclipse

Hi so I am working through this book called Beginning Android Games because and I am having some problems with the Android 1.5 Android Virtual Device.
First the SDK for Eclipse (the program I am using) didnt have the 1.5 SDK for Android so I had it installed when you first try to run a AVD it asks has a checklist of SDK's that will be fetched and installed for you if you check the box. I did this, had the 1.5 SDK installed however when i try to run a AVD emulator using the 1.5 sdk i get a
(Failed to allocate memory: 8 This application has requested the Runtime to terminate it in an unusual way. please contact the application's support team for more information.)
type of error. But when I used the default 4.2 SDK for an AVD emulator the emulator showed up. I dont get what im doing wrong here.
Also in eclipse i have the Android ADT and SDK installed. In eclipse when i click on window then Android virtual device manager and I try to start a new emulator the 1.5 sdk i installed doesnt show. But when I click on window->sdk manager->tools->manage avds then my 1.5 sdk shows up and I can use it.
The problem was in the amount of ram for the virtual machine.
This following solution worked for me. In the following configuration file:
C:\Users\<user>\.android\avd\<avd-profile-name>.avd\config.ini
Replace
hw.ramSize=1024
by
hw.ramSize=1024MB
Go to Help -> Check for updates if there it shows some updates needed, then you can install them. May be it will work.

Categories

Resources