I understand this question has been asked a few times, however the solutions for the other users have not resolved my issue. I am attempting to install ARCore on my Android Studio emulator. The Play Store says "Your device isn't compatible with this version," and when I click and drag the ARCore for emulator APK to manually install it on the emulator, it gives me the following message: "The APK failed to install. Error: Could not parse error string"
The System Image I'm using: Oreo/ API Version 27/ABI x86/Android 8.1 (Google Play)
I have set the OpenGL ES API level to Render Maximum, and its version is showing up as OpenGL ES 3.1.
I have tried every solution I could find on here and have had no luck. Has anyone else had this issue or can you offer any suggestions?
If your smartphone doesn't support ARCore or you have no phone but need to debug an AR app – Android emulator is a great way to do it.
Follow these steps to install Android Virtual Device (AVD):
Make sure Android Debug Bridge (adb) is installed and works properly.
Download the latest ARCore_emulator.apk from GitHub.
Choose AVD using menu Tools > AVD Manager and run it.
Type this command in Terminal while the virtual device is running:
adb install -r ARCore_1.8.0.x86_for_emulator.apk
Repeat previous steps for additional AVDs you’d like to use on port 5554.
If you need more detailed information, please read THIS POST.
Followed Andy's Answer as follows:
Make sure adb is installed by typing adb at any terminal. *
1) Downloaded Google_Play_Services_for_AR_1.14_x86_for_emulator.apk from Android SDK Google Services (download it from latest release)
2) Copied this ***_x86_for_emulator.apk to the project root folder
3) Create new or Edit/Update existing Emulator with the instructions on the docs: How to create an Emulator with ARCore Support
i.e you must have emulators settings done.
4) Run the emulator
5) Open the terminal at Project Root (or anywhere you copied the ***_x86_for_emulator.apk file) and execute:
adb install -r Google_Play_Services_for_AR_1.14_x86_for_emulator.apk or
adb install -r <name_x86_for_emulator>.apk
5) Now run the project on same emulator. You can update rest of the emulators with these steps, providing that they have settings as given in Step 3.
Related
I got an app that I'm perfectly able to run/debug while connected through USB from Android Studio on my Nexus 5 (Android 6) and LG Stylus 2 Plus (Android 8) phones, but it seems to fail when testing it on my Huawei P30 (Android 9).
I'm able to see all 3 devices as available from Android Studios' "Device File Explorer" tab, and browse the files in it, so I know that it is able to connect just fine.
Still, whenever I try to debug or run the app on my Huawei, the app is built, and as soon as it is going to start the install process, the phone disconnects and is immediately reconnected to the PC, resulting in a failed installation attempt.
All I can see from Android Studio is the following message:
Installation did not succeed.
The application could not be installed.
Installation failed due to: 'device 'ABCDEFGHIJKLM' not found'
I did have trouble getting the right drivers for the Huawei P30, but I believe that if I'm able to see the phone's files now, this should not be a driver issue anymore.
I've tried every phone configuration in the phone's developer options that I could find to no effect.
TL;DR:
These two android tools' versions were outdated:
Android SDK Build-Tools
Android SDK Platform-Tools
Update all android tools to the latest version, and make sure no old ones linger around, and you should be good to go. =)
After I tried to upload the APK directly into my phone from Android Studios' "Device File Explorer" tab and it failed with the same behaviour, I knew something was wrong with the adb-server. So I proceeded to run the adb directly from the console with the following commands:
$ adb start-server
$ adb push abcdefg.apk
The server started just fine, and resulted in the same behavior, but this showed me a new error/warning message that I was never shown in Android Studio:
adb server version (30) doesn't match this client (41); killing...
This was enough for me to find questions and blogpost like this one: How to resolve - “adb server version (32) doesn't match this client (36); killing…”
I guess this phone is very new compared to the old Android tools I have installed, so basically, all I had to do was to update these 2 tools (to the latest version) from the Android Studios's Android SDK configuration menu:
Android SDK Build-Tools
Android SDK Platform-Tools
Now, it is very important that you uninstall any old version of the tools that you may have lying around so that there is no chance that those get used (because it did happen to me during the process). You can check it by clicking the "Show package details" checkbox, and only check the latest version:
After this, kill adb from the Task Manager (if it was running), and restart Android Studio. This should make sure you are not using any old version.
I made a simple hello world app which I would like to deploy to an emulator in Android Studio.
This used to work before for exactly the same project (I installed all necessary packages) but this time for some random reason, in the run options when I select "Target: Emulator", under the "prefer Android virtual device" I get the following in red: "Unknown AVD".
I've googled around and the answers vary. The answer that seems to make the most sense is:
You have to install all Intel Image Library and Google API for your
desired API. Go to your SDK Manager and check intel system images is
installed or not if not then you have to installed it as well install
Google API Library.
However I don't have these "Intel Image libraries" and "Google API" options in SDK manager. Are these shorthand aliases for other names in the options?
Any ideas on how to get the emulator up and running?
A bit of information on my environment:
Android Studio 2.3.3
Windows 7 Professional 64 Bit
Gradle Version: 3.3
Selected SDK Platform Package: Android 7.1.1 (Nougat)/ API Level 25
Revision 3
Virtual Device: Nexus 5X API 25
Try to kill the adb server and restart it.
Locate your adb binary (linux/osx) or adb.exe (windows) and do:
adb kill-server
adb start-server
this should fix your problem
Even if your problem still not solved then Restart emulator.
Locate the adb.exe by going to where your sdk is installed and go into platform-tools. Mine is the default and also the most common (C:/User/$USER$/AppData/Local/Android/sdk/platform-tools/)
After that kill the server and start the server back up. That might fix it, if not drop a comment and let someone know that the problem isn't yet resolved someone may be able to help.
this problem may be related to the version of the gradle file of your application. Try this:
goto Android -> Gradle Scripts -> Build Gradle(Module :app)
I am trying to run a phonegap application for android on my OSX.
when I try to run phonegap through CLI I get this
No target specified and no devices found, deploying to emulator
Error: No emulator images (avds) found.
1. Download desired System Image by running: /Users/susanne/Documents/roger/02_Onni/09_development/application/android-sdk-macosx/tools/android sdk
2. Create an AVD by running: /Users/susanne/Documents/roger/02_Onni/09_development/application/android-sdk-macosx/tools/android avd
HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver
I have done no 1. but I cannot find the 'android avd' file mentioned in number 2. Also even though I connect an android device it does not find it.
I would be very happy if anyone could help. This is probably not a phonegap specific question but rather an Android question.
This problem is because of you didn't created device. So you have to firstly create the device in android sdk.
For creation of android device you have to install the avd first.
i have some screenshot hope help you.
Prepare your Android API like this:
Then go to Tools->Manage avds :
In my case i have created 2 devices already. go to Create:
and then add specification that which kind of device you want here is dummy for your understanding :
click Ok and your device will created. then run your app again.
thanks.
I'm using the new VS Android Emulator with Android Studio:
https://www.visualstudio.com/en-us/features/msft-android-emulator-vs.aspx
It doesn't have Google Play Services installed... so I'm following this guide to install:
https://university.xamarin.com/resources/how-to-install-google-play-on-android-emulator
I've downloaded the proper Gapps file (in my case):
http://www.devfiles.co/download/7m2VdVjQ/gapps-kk-20140105-signed.zip
Now I've dragged and dropped the ZIP file onto the emulator... and it's just stalled at "copying file"... Is there anything else I need to be doing here in order to get Gapps installed? How long does this "install" usually take?
I was trying it out yesterday myself and had the same problem. Apparently, non of the drag and drop functionality worked. So this, is what I did to resolve the issue:
Use the Additional Tools (small >> icon) for the emulator and go to the SD Card tab.
Select a folder on your computer to sync with the virtual SD card.
Pull from SD card, which will create a folder structure on the selected folder.
Now copy the Gapps fill to the 'Download' folder.
Push to SD card. This will take a little while, and copy the zip file to your emulator.
Run a commmand prompt, and go to sdk\platform-tools in your Android SDK location and run adb devices.
If you see the your emulator in the list, then skip to step 9.
If you do not see emulator, run the following:
adb connect <emulator ip>:5555
You can find the emulator ip, from within the emulator, go to Settings -> About Phone -> Status and IP section.
Next run, adb shell. This will give you a prompt to the android emulator.
Confirm the gapps file is there: ls /sdcard/Download
Now run, install_zip.sh /sdcard/Download/<flashablezip>.zip
This should begin the flashing process.
Hope this helps in resolving the issue.
Now you can just drag&drop proper Gapps file to working Emulator and then you should see something like this:
Drag and drop doesn't work if you start the emulator from Visual Studio when you are running Visual Studio as an administrator. To be able to drag and drop run the emulator from the start menu (not as administrator) not from Visual Studio.
It seems that the emulator hangs trying to install files if it cannot find adb.exe.
Ensure you have the Android SDK installed
If you run regedit.exe and look at the HKEY_LOCAL_MACHINE\Software\Wow6432Node\Android SDK Tools reg key, there is a Path string value that points to a location on disk. Double check to make sure that there is a copy of adb.exe located in the platform-tools directory under that path.
Hope this helps.
Found a solution on the web that works. The article suggests it only works for Android 5.1, I haven't tried Marshmallow.
http://www.rajapet.com/2016/03/adding-google-play-services-to-visual-studio-android-emulator.html
Start "Visual studio emulator for android" from the start menu
Create a new emulator for Lollipop, 5.1.1 (API Level 22), start it up
As VS emu runs under x86, we need the "ARM Translator", found on this page:
http://www.techbae.com/download-install-arm-translation-v1-1-zip-genymotion/
([TechBae.com]Genymotion-ARM-Translation_v1.1.zip)
Drag the file to the emulator window, close and restart the emulator if it doesn't automatically.
Install gapps from http://www.teamandroid.com/gapps/, eg gapps-lp-20150314.zip
Just download, drag to emulator, restart
Wait for app optimization to finish
Open Play Store, ignore any errors. If play store hangs, kill it and start again
Sign in
Expand the side menu
Go to settings
Scroll down to Build version, click/tap. You should get a message that a new version of the play store will be installed
Wait for the XDE.exe process to stop downloading
Restart the emulator
Go back to play store, side menu, click Build version - Ensure it is up to date. If not, let it download
Install an app that uses play services, eg Maps to verify
I tried all the previous answers, including the accepted one about running the install_zip.sh shell script, but nothing worked right for me for VS emulators of Android Lollipop (5.1) and Marshmallow (6). The problem seems to be also that Gapps has now some native code, processor specific, and most Gapps packets available for download are compiled for ARM processors. I tried OpenGapps which does have processor specific packages, but their complex installation scripts didn't work for me in VS emulators.
I finally found a Gapps package prepared for ASUS Zenphone 2, which does have an Intel processor - specifically I downloaded the package recommended here, and that installed fine with just drag and drop on Visual Studio emulator for Android 5.1
Following the instructions above, I could NOT get Google Play Store to launch successfully on my Marshmallow 6.0.0 Tablet API-23 VM in VS Emulator for Android.
I've tried all the troubleshooting methods mentioned above to no avail.
What finally worked for me was installing (dragging & dropping) the PREVIOUS version of GAPPS (gapps-lp-20150314.zip) for Android 5.1 Lollipop API-22 in my Marshmallow 6.0.0 VM.
Worked like a charm!
http://www.teamandroid.com/gapps/
http://www.devfiles.co/download/fAgtiEoX/gapps-lp-20150314.zip
Tomasz Cielecki pointed out a solution that involves installing gapps twice.
First install the gapps downloaded from here, reboot the system and then install gapps again with a version downloadable from here.
At least this worked well for me.
You could just use an Android Emulator image (AVD), similar to a VM image, one that has a Google Play services installed. That would be easier than trying to install it in the emulator. Usually, you can see this Android Studio under Tools > Android > AVD Manager and create a Virtual Device and select from the images which has Google Play Services already.
Now Docker + Hyper-V + Android Emulator is possible without needing VS Android Emulator (in fact they seem to be a discontinued job).
Now the Google's emulators work well even with Hyper-V activated.
More info here about how to make it work here (spoiler: it is a simple tick in a checkbox) https://android-developers.googleblog.com/2018/07/android-emulator-amd-processor-hyper-v.html
I wanted to try my hand at programming android devices, so I followed the directions from the android website, installed the sdk, the java sdk, and eclipse. My computer is Windows 7 64-Bit, but I have the 32-bit Java SDK and Eclipse installed since hearing that there are issues with the 64-bit versions.
I am running the most recent version of the Android sdk, 4.0 R15.
I believe followed all of the instructions for installation, but when I load up a sample (Lunar Lander in this case), it loads the emulator, but will not install the app to it. ADB does not show the emulator listed when I use "adb devices", the DDMS perspective in eclipse does not detect any device either. In the emulator I have activated the USB debug setting in the developer area.
I have tried restarting the adb server, and have reinstalled a few times.
I even copied what one guy did on a youtube tutorial for a hello world program, and it still would not load to the device.
Does anybody have any idea how to get the emulator and eclipse talking so I can actually run and debug programs?
Try to adb kill-server and then do adb command like adb devices which will start adb again.
It helps in my case.
Best solution I found is this:
Open DDMS(Window->Open Perspective->DDMS)
In DDMS in the left side there is a Devices tab, a little below there is a list of items, choose little triangle called View Menu, under it find Reset adb and launch it.
After that I get my emulator detected.
Create new AVD following Window->AVD Manager->New (Give a name to your device & select the target) -> Create AVD.
Select the AVD that you created and Click Start to launch the devie.
Only on launching, the device is displayed under adb devices.
For starters, I think you can try the 64 bit versions of Java and Eclipse for Windows. I've Windows 7 64-bit edition, 64-bit java and eclipse versions and all work very well, without any glitches. I however have a question. Where exactly have you installed Android? I mean, using the installer that's available in the Android Developer website. If you've installed it in C:\Program Files, then try re-installing it in C:\ directly instead of Program Files directory. I had faced issues when the directory was C:\Program Files and then I changed it to C:\ .
I noticed that if you allocate a lot of memory to the device it can "freeze" when starting, if frozen for a sufficient period it disappears from the adb devices list. Try reduce the memory footprint of the application?