Customize Android development environment resolution (Android x86 and eclipse combination) - android

I a few days i will get a new Samsumg Galaxy SII and now i want to try developing apps for Android, so i installed eclipse and the ADT however the emulator seems to be painfully slow so i found a workaround: installing the generic x86 version in Oracle VirtualBox and connect it via adb connect <ip> to eclipse and it works extremely well.
However i am running in a "high res" version or something like that and i would like to scale it down to some more common resolution to imitate the resolution of smartphones like my Galaxy. Is anyone familiar with this customization?

I'm not sure how one can control the resolution at install. However, you if you run it live from the disk, you can highlight VESA mode. Then,
If you want to use higher resolution, you can edit the boot option by
pressing TAB, change vga=788 (800x600) to vga=791 (1024x768) or
vga=794 (1280x1024), and press Enter. You can also use vga=ask to see
all available modes. But please note Android will only work under
16-bit mode.
http://www.android-x86.org/documents/virtualboxhowto
For 800x480, you'll want video mode 375.
I've tested on 2.2 and 2.3: "android-x86-2.3-RC1-asus_laptop.iso" and http://code.google.com/p/android-x86/downloads/detail?name=android-x86-2.2-generic.iso&can=2&q= and i can get that video mode to work fine. After entering vga=ask, hit enter to see all the modes, then enter 375.

Related

Android studio emulator skin with M1 Pro

Hey guys so I am trying to set up my 16 inch MacBook pro M1 pro for react native app development. While setting android studio I tried to set the android studio emulator with skin but it does not work. I tried searching the web but didn't find much information and as far as I have seen Youtube most of them also have the same. I tried the advanced settings and tried to set the skin option but it still doesn't work I'm just asking is it my set up or it's with everyone
I had this exact issue with Android Studio's Emulator on my 2020 M1 Macbook. I tried many different devices and android versions but it seems that Android skins/ frames/ camera cut outs are unsupported on the new silicon chips: https://medium.com/mobile-app-development-publication/my-journey-to-setup-android-emulator-for-m1-macbook-pro-b8365321b3e7
However, I found a workaround that will get you a punch-hole camera and a couple of different options that might suit your needs. This can be achieved by:
Go into the phone settings app (the emulated device settings, within the emulator itself)
Find the build number (usually under "About emulated device")
Click on the build number 7+ times (this activates developer options)
Go into the developer options and find "device cut out"- here there will be several options such as a punch hole camera which will make the AVD emulate a suitable cut out within the device screen. This will at least allow you to test to see if your status bar is responsive to such things.
Screenshot of AVD Google Pixel 5 API 33 with punch hole camera
Hope this helps and please let me know if you find another way.

Can't change emulated performance of AVD in Android Studio

I can't change the graphics to software as I'm sure this is the fix for my AVD not launching.
The option is greyed out (see screenshot). Has anyone has experience with this? I couldn't find anyone who had the same issue.
I'm running the latest version of Android Studio on Ubuntu 17.04.
Actually, this problem seems to be limited to devices with Play Store available, so Nexus 5X and Nexus 5 images will be forced to use Automatic Graphics, but all other devices allow you to choose either Automatic, Hardware or Software graphics.
edit: I've just tested this today and it seems to no longer be the case. At least on MacOS with Android Studio 3.3.2, I can now make a Nexus 5X image with Play Store and Hardware Graphics. I'll do more testing at home later, on Windows and Linux to see if it's related to OS or graphics drivers.
I also think it's related to whether the Playstore is contained or not, but I cannot explain why.
Dielson Sales already gave the answer which worked for me - unfortunately only in a comment to this answer. I just thought it's worth to make a "real" answer out of it:
Edit the config.ini file of the AVD. Under Linux it's located under /home/<user>/.android/avd/<AVD-name>/config.ini
(in my case <AVD-name> is Nexus_5X_API_29.avd).
In a text editor change the lines
hw.gpu.enabled=no
hw.gpu.mode=auto
either to
hw.gpu.enabled=no
hw.gpu.mode=off
or to
hw.gpu.enabled=yes
hw.gpu.mode=host
This setting remains even if opened in the Android Virtual Device Manager of Android Studio. It's just not editable there.
I also tried this, which I found in another AVD:
hw.gpu.enabled=yes
hw.gpu.mode=software
But this is then changed to "no" / "off" by the Android Virtual Device Manager.
I didn't look any further so far. hw.gpu.mode=off worked for me. Otherwise my whole Kubuntu hangs (using the Nouveau driver, not the NVidia driver)
Seems like the problem was with the choosen VM. If I choose a Nexus 4, it runs just fine.
I am little late on this thread but following are my findings and solution. I am using Ubunut 18.04 and faced the same issue. The solution is to edit AVD and under Emulated Performance, change the grpahics to Software. The problem was that this option was disabled for me. I was unable to change graphics drop down.
I did some more research and found that while creating AVD if you choose default/existing device definition on first screen, you will not be able to edit graphics drop down.
The solution is to create a "New Hardward Profile" while creating AVD and use your new profile. Now, you will be able to edit "Grahics" drop down.
Hope this helps....
It seems all emulators with Play Store cannot emulated performance. I am using AS 4.0
Open Android Virtual Device Manager Android Studio, change VMHeap to 512, RAM to 4096 MB. Then restart Android Studio.
I think It's just a bug!
Solved the issue by selecting any virtual device had the option enabled and after finishing the installation I just clicked on edit and reselected the device I wanted and the option was still enabled.
Click on edit button from here.
Then change the device to the one you want.
For those who are still searching for solutions on how to make it work with an image containing google play store: install / update your GPU drivers solves the problem. On my Ubuntu 20 this was the issue.
I'm working on mac os - after i upgrade my os my emulator stoped working and one of the solution was to change the graphic settings from hardware to software - since i couldn't - came here ---> turns out Android Emulator HAXM on macOS High Sierra is left out from security reasons
follow this link : https://developer.android.com/studio/known-issues#deploy

android studio failed to create drawable

I'm trying to run the emulator in Android Studio. When I run the avd for Nexus 5 API 8, the phone image appears, but the screen is blank. Some research uncovered that the nexus screen may be too dense to display on my 1368x768 laptop screen, so I tried creating smaller density avds such as 4" wvga nexus s and 3.4" wvga. When I run these, I get the error "failed to create drawable" and no phone image pops up. When I connect my LG phone via usb in developer mode, the app works fine on the phone. Why can't I get the emulator to display the app output?
I had a similar problem and the solution was to disable hardware rendering.
Steps:
Open Tools\Android\AVD Manager
Edit the Virtual Device (Click on the pencil)
Change Emulated Performance - Graphics to 'Software-GLES 2.0'
See also this answer for other options.

Emulator does not show home screen after waiting more than half of hour

I made an android project in android studio & test it in real device it works fine but now i have not real device with me & want to run the project in Emulator. I install the AVD & intelhaxm-android.exe from the directory
C:\Users\INZI\AppData\Local\Android\Sdk\extras\intel\Hardware_Accelerated_Execution_Manager
after that I created Virtual Device to test the app but when I run this it shows black screen with android printed in the centre of the device but does not show the home screen. I tried it with the
Visualization technology Enabled in BIOS setting. what should I do now I waited about more than a half of the hour but its same.
Please help
Thank you in advance
I resolved the mentioned problem Emulator was not showing the home screen because
I have more size of virtual Device than Haxm
I haven't completely downloaded the API with which I was testing.
Now I set less size of Virtual Device & test the app with the lower API that I fully downloaded .... now its working fine.
If I were you, I would try Genymotion which is a much smoother emulator than the default. Furthermore, you will not run into any problems while setting it up as the program handles everything for you. Of course, as you become more experienced, you will want to debug your apps on a real device but as you do not have access to one, Genymotion is your best option.

Custom app installed onto Galaxy Nexus doesn't look anything like it should

I am developing an app in Android that I hope to release. I've got most of my GUI done, but it does not look even close to correct on the device when installed and opened. I have a screenshot of how it looks, and a screengrab of how it should look (taken from the Emulator in Eclipse) at the links at the bottom of this post. It's best to take a look at the two images rather than me try to describe how screwed up the app becomes on my device.
I had a friend with the exact same device, including hardware and Android version, and his loads up just fine. Does anyone have any idea what's going on here? Both devices are Galaxy Nexuses, running Android 4.0.2, GSM on AT&T (unlocked).
Installed on my device: http://i.stack.imgur.com/x66Jo.png
In the emulator: http://i.stack.imgur.com/qE0J6.png
I've seen this occur in some Galaxy Nexus' and I put it down to a bug/glitch in the OS on that Galaxy Nexus. Try a Factory Reset of your Galaxy Nexus, if that fails, try reinstalling the current OS version you have (if you can get your hands on it), if that fails, get it fixed under warranty.
Does your app use multiple activities?
Can you compare on your two devices if this setting is the same?
Settings > Developer Options > Don't keep activities checkbox.
I realise this is an old question now but I was having the same problem as you and stumbled across a solution. I didn't particularly want to factory reset my phone as per straya's instructions, so I started playing around options in the Settings > Developer Options menu.
As it turns out, this problem occurs for some applications if you have the Force GPU rendering option checked. Disable this (I'm not sure why it was enabled anyway) and everything displays as it should.

Categories

Resources