Developing Android Apps - Can't use any android emulator - android

I searched for days to find a way to start programming android applications however I failed every single try.
First I installed Android Studio on my Windows 7 computer, everything went fine.
After installation I tried to start a project and debug it and appeared my first error that you can see in the link below.
http://i.stack.imgur.com/q9BlJ.png
Then I searched here on stackoverflow and I searched on every single website that is related to this error. What did I learn?
I need to install an Intel package on SDK Manager
I also need to install an executable present on appdata android studio directory
I MUST disable or uninstall hyper-v to install the exe file I spoke on the step before
I searched on how to get this hyper-v out of my computer and I found many ways however when I tried this ways and then tried to install the exe file, it shows this message:
http://i.stack.imgur.com/gQjON.png
I don't know if my computer has hyper-v, the only way I can't do is going to my BIOS and disable it because I don't know the keys I need to press to show my computer BIOS (on the startup it doesn't show any label about the BIOS keys).
My computer model is Sony VAIO VGN-NS11Z_S, if someone knows the BIOS keys please tell me.
I can't use the emulator to try out my app so I gave up from Android Studio and I started with Eclipse and the ADT Plugin.
My problem is still the same, I don't if it is because hyper-v but the android emulator don't work.
Everything is fine but I can't test my app so I can't develop them too...
I really appreciate any help, I want to create Android apps so much, please give me an alternative or a way to fix my problems.
Thank you

You can try using Genymotion. It also needs some sort of hardware acceleration but give it a try.
It can't be that hard to find out the keystroke for your BIOS (EDIT: okay, it can be obviously for some devices). Just google for "your mainboard manufacturer + bios". I found this thread, one post even mentions Hyper-V.
Android Studio and Eclipse have nothing to do with the Emulator. The Emulator is part of the Android SDK which is identical for both IDEs. Throw away Eclipse (at least for Android).
As a last resort, run the Emulator with an ARM image instead of the i86 one, I think it runs without HAX and without hardware acceleration. It's damn slow though.
If you want to do serious Android development, there's no way around a real device. There's plenty of cheap options. That's just a little heads up though, I understand though that you still need an emulator for development.

Here's an interesting link on Sony's website about a BIOS update that may help (disclaimer: BIOS updates are not guaranteed to be safe, install at your own risk and make sure it's the exact right one for your computer):
http://www.sony.co.uk/support/en/content/cnt-dwnl/prd-comp/EP0000208387_4486/VGN-NS11Z
But also within that link it mentions to press F2 to get into your BIOS. Does that work for you?

Related

Cannot locate connected device in Processing

I'm having trouble getting Processing 3.3.6 (x64) for Windows 10 to recognize my LG V20 android device.
At first, I was getting a NoClassDefFoundError when I tried to run a sketch, and the Android SDK updater had 2 suggested updates that I couldn't install due to more errors. My phone was not listed in Processing. The device was I've enabled USB debugging, and the connection works; I can transfer files fine.
After reading across the internet with little advice or success, I tried uninstalling all Android-related files on my computer, as well as any Processing-related files. I uninstalled Java, JRE and JDK. I then reinstalled them all:
Java 8u161 JDK and JRE
Processing 3.3.6
Android SDK (auto-installed by Processing)
It all installed without complaint, and everything seemed fine. However, Processing still can't find or recognize my device. I've also tried these exact steps on my laptop which has a mostly clean install of Windows 10 (apart from chrome and some bloatware) with the same results.
I also tried running something via Processing's emulator; I may have done this wrong, but this comes up with a "Lost connection with emulator while launching" error.
From this, it feels like it HAS to be an issue with the phone, since it's on multiple PCs. But it also HAS to be an issue with the PC, since it occurs on both a phone and an emulator. Frankly, I'm dumbfounded as to what the problem is.
I'm not really sure what else I can do or try; I haven't found my problem anywhere else, and tried the solutions to all similar problems with no success. Does anybody have any ideas?
EDIT: I fixed the problem. I tracked down the location of my adb.exe, and ran "adb devices" in cmd at that location. It listed one
device (mine), and said it was unauthorized. A prompt appeared on my
phone, and upon confirming it, the device was authorized.
first off all check is your device connected to sdk by running this command
sdk/platform-tools/adb devices
if your device name not found make sure that you have USB debug enabled
goto settings/developer settings/ allow USB debug mode
if you don't see this option search how to enable developer settings for your phone mine was like
goto settings/about/software info
and tap constantly on build-number for 7 times
I love Processing and I dreamed with the chance to use it for making Android apps, as the "Android Mode" promises. Both mentioned issues (no device connection + no emulator available) as well as the endless red Java error messages couldn't never be fixed. I tried everything regarding Android Studio & SDK parameters & component installation, as well as different PC plattforms without success. Trying to configure the SDK for matching Processing's requirements was also a waste of time. Nothing helped. People who got it, they neither know how it runs nor why it doesn't.
Forget Processing for Android, use & enjoy programming with MIT App Inventor, and really start running apps in one hour. Let's use Processing for its original purposes.

Hyper-V and Running Android Studio [duplicate]

To my knowledge, an x86 Android emulation using Intel's Hardware Accelerated Execution Manager and Windows 8 Hyperv cannot be run concurrently at the time of this writing.
The best answer would allow them to run concurrently (probably not currently possible).
The most common workaround is to uninstall the Hyperv feature completely. If you actually need to use Hyperv this is painful. A better work around can be found here. http://blogs.msdn.com/b/virtual_pc_guy/archive/2008/04/14/creating-a-no-hypervisor-boot-entry.aspx . This forces you to reboot, but at least you're not having to constantly uninstall/reinstall Hyperv.
I'm looking for a solution which doesn't require anything to be uninstalled and doesn't require a reboot.
I don't know if this is good answer for you. I had similar problems with x86 emulator. I've switched to Genymotion - Google Play Services are working fine, and it's really fast + official plugins for Eclipse.
But you need to install VirtualBox (but it's free) so this shouldn't be a problem.
Genymotion site: http://www.genymotion.com/
This looks like it will be the answer.
http://blogs.msdn.com/b/visualstudioalm/archive/2014/11/12/introducing-visual-studio-s-emulator-for-android.aspx
I won't mark it as answered until I actually try out the RTM bits (it's in preview now), but it's a Hypver-V based android emulator. The first 2 pain points the blog post claims to solve with the new emulator are Slowness of other emulators and Conflict with Hyper-V on Windows.
All you have to do is temporarily disable the hyper-V with a very simple command I found. You could find the detail on the link below.
https://superuser.com/questions/519991/vmware-player-is-not-working-after-installing-hyper-v-on-windows-8-pro
The android emulator is now supported on Hyper V (It's in preview now): Details here: https://blogs.msdn.microsoft.com/visualstudio/2018/05/08/hyper-v-android-emulator-support/

Android Studio: Hardware Acceleration

This is driving me absolutely crazy and I can't find any help. I'm fairly novice when it comes to emulators, and even more so when it comes to Android Studio. Here's my problem: I installed Android Studio. Downloaded the SDK updates, including the HAXM one, and set up my own AVD. Upon trying to start up my AVD, or even the starter AVD that was already there, I get an error stating that "emulator: ERROR: x86 emulation currently requires hardware acceleration!"
I've done some googling and tried to finish the install of HAXM using the install file in the Android/SDK folder. I was promptly told that the installation failed and that my CPU didn't allow for Intel Hardware Acceleration, or something like that. I read somewhere that the only way I can use Hardware Acceleration on AMD is if I were on Linux, with which I have no experience with. So I tried giving up. Now I can't figure out how to disable Hardware Acceleration entirely in Android Studio. I haven't even begun learning how to write in android because I can't get an AVD up and running.
Does anyone have any tips for a complete Android noob? I thought this would be something fun to try since I was at once point fairly good with C++ and I have always been a huge fan of android. However, I've avoided doing anything GUI related until now, and I'm not finding it very fun at the moment.
I'm running an AMD system with 8GB of ram. More specifically, I'm using an AMD FX-4130 Quad-Core Processor on a GIGABYTE GA-970A-DS3 Motherboard.
Unfortunately AMD's virtualization technology AMD-V is not compatible with Intel HAXM. Your only choices are to either get familiar with Linux or use a ARM-based AVD, which doesn't require virtualization.
You can find instructions for Linux on Android Developers' document on Using the Emulator.
You can use Genymotion instead of default one. Its faster than the default one. And this emulator is compatible with both Intel and AMD. Genymotion just uses Virtualbox to run Android in VM.
Here's a link to Genymotion .
Genymotion , Genymotion user guide
it may help you.
Take an android phone with its USB cord then follow these steps:
1. plug in phone to computer.
2. on the phone goto: settings>about device scroll to find build number
3. press build number 7x (this enables developer mode)
4. go back to settings press developers options select usb debugging, include bug reports, verify apps via usb, and GPU force rendering.
5. Check for device connection on the computer
6. add in build.gradle under "buildTypes{" write this
debug { debuggable true }
then when you run your project you should be able to see your phone in the avd selection then select it. Your phone will awaken automatically with your application running except it will be a little semi-efficient boot process.
Also do not forget to remove the debug code from your gradle file when you app is finished.

How to run Android-x86 4.2 iso on VM VirtualBox?

I want to use Android-x86 to test and debug my App.I tried other versions of Android-x86 before successfully,but there is an erroe in about android-x86-4.2.So I ask my question here because it may be happen for others:
I installed oracle VM virtualBox on Win7 32-Bit,then I downloaded android-x86-4.2-20121225.iso from Android-x86 - Porting Android to x86.After I installed Android x86-4.2 on VirtualBox from iso and creating fake SD Card for it,I tried to run it,but when I started it I saw these lines in console:
Detecting Android-x86... found at /dev/sda1
ANDROID root#x86:/ #
And no thing else,even I waited more than 20 minutes and nothing happen!I tried that some times but result is the same.How I can solve this problem?
I asked same question in superuser and I found the way to start it. The correct answer is:
From the install/live CD, you just need to change the value of "androidboot.hardware" parameter
in the grub command from "Android_x86" to "x86". You can do this by
pressing "Tab" in the boot menu or by editing "isolinux.cfg" file on
the installation ISO Image.
If you installed Android-x86 on hard drive,you have to select desired boot option and press e to edit grub command.
I don't know about the project Android X86 - Porting Android to X86. I see in the web, this emulator has a complex installation. I think, if you want to try a fast Android emulator and install easily, debug faster, you can try project AndroVM. It is easy to install it to Virtual Box by downloading the image file and import to Virtual Box .
For what I understand of Linux (which it isn't a lot, but enough I'd say) you're logged in into the system and waiting for you to type some command. If I'm right, you should launch the X server but on an Android environment I don't really know how.
UPDATE:
For what I read here, it's just what I said: it boots and after that it prompts the command line. Two solutions that appear on the link are:
Type start.
Select VESA option before the boot process (I can't help you out in this one, because I don't have the .ISO to try right now).
Please, check them.
The best way to run android x86 on pc is to format a partition in ext3 format.Then install android on it.It will allow androidx86 to run easily.
I have HP430 Laptop with win 7. I had the same problem. But I figured out the solution.
While booting the computer with win7 I entered BIOS menu. There was a option to optimize pc for virtualization.I selected it. After that every thing ran smooth.
Later I noticed in virtual box that, in system settings the acceleration type was VT-x AMD, Nested Paging,PAE/NX. This was different before optimization.
Hope this gives some idea.

(undetailed) Panic while creating Android Virtual Device (AVD)

Programming newbie, just getting started with all of this...
I have searched around, but I haven't found anything relevant to my problem
So here it is,
So I'm trying to build a simple hello world application for android, but I wanted to test run the AVD just to check things out.
But I get this problem:
(it just shows "PANIC: Cannot create AVD", no further info)
I have tried creating virtual devices based on 4.2 and 2.3.3, but none of these start up.
I have sdk up and running, no problem.
I also have all the files required (like the system images etc)
Eclipse 64-bit also runs fine (had some errors, but solved them using search)
Any help?
I run windows 7 64bit, 500gb hdd, 4gb ram, i3#2.4ghz
SDK, Java, Eclipse and all other tools are 64bit based.
Please help.
If the emulator takes up too much time to load or getting lags then you should try this. Called as Intel Virtualization Technology with HAXM.
I know this is not the answer of your question but that might be helpful for you. :) It can greatly increase emulator speed.
You can check : Here
If you are on windows, make sure that the amount of RAM the AVD will have access to is 512MB or less. It doesn't matter how much RAM your computer has, this is a bug.
What happens when you run the following from shell/command prompt? This should give you more information when the emulator is launching and should help diagnose the issue.
emulator -verbose -avd <name of emulator>
Okay, I seemed to have solved my problem
What I did was copy the default .android folder (it was auto generated in D:.android) to C:\Users\Administrator
Although this just works for one launch
For every subsequent avd launch, I had to re-copy the folder and replace only the edited files
Thanks everyone for trying to help!
You must establish (from security or from the advanced properties of your PC) the local variable ANDROID_SDK_HOME to your docs folder.

Categories

Resources