android-emulator

Cannot Write to sdcard in Android emulator

不羁的心 提交于 2019-12-17 16:34:24
问题 I have added this line in the AndroidManifest.xml: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> However, when I run code to write to the sdcard , I get this Error: 02-19 13:24:46.760: E/CameraTest(598): /mnt/sdcard/image.jpg: open failed: EACCES (Permission denied) How do I solve this problem? EDIT: I am using the Android Emulator with SDCard added. EDIT-2: I know what the problem is now: I have called the function Environment.getExternalStorageState() and I

Run custom ROM on Android Emulator

余生颓废 提交于 2019-12-17 16:18:09
问题 I downloaded a third-party ROM, and I want to run it on the emulator first before flash it into the phone. Here is the contents of cm-11-20140911-NIGHTLY-p3110.zip : 1. boot.img 2. file_contexts 3. META-INF/ 4. recovery/ 5. system/ I unpacked boot.img using the script unpack-bootimg.pl and get boot.img-kernel , and boot.img-ramdisk.cpio.gz. Then I repacked the system using the make_ext4fs and got system.img . I created an AVD and execute: emulator -system ~/cm11/system_new.img -ramdisk ~/cm11

Google map displaying only blank tiles android

懵懂的女人 提交于 2019-12-17 16:14:07
问题 I have implemented google map in my app.But its display only blank grids.I have done changes in AndroidManifest.xml file and also included API key in layout file of map activity. 回答1: This may sound silly, but I kept encountering this problem until I realized that the <uses-permission> tags need to be direct children to the <manifest> element, rather than the <application> element. I had erroneously been putting them right after the <uses-library> tag. So the final structure of your

Android Studio emulator: ERROR: detected a hanging thread QEMU2 main loop

六眼飞鱼酱① 提交于 2019-12-17 15:49:10
问题 I use Android Studio 3.0.1 on Ubuntu 16.04. Yesterday, Android Studio popped up a message saying that there's an update available, and I always click those. It then notified me that it had successfully updated the emulator. My AVD worked perfectly before, but after the update finished, now when I launch it, it shows a black screen in the emulator window for 15 seconds and then crashes with the following error message: ERROR: detected a hanging thread 'QEMU2 main loop'. No response for 15000

Changing the Android emulator locale automatically

安稳与你 提交于 2019-12-17 15:34:10
问题 For automated testing (using Hudson) I have a script that generates a bunch of emulators for many combinations of Android OS version, screen resolution, screen density and language. This works fine, except for the language part. I need to find a way to change the Android system locale automatically. Here's some approaches I can think of, in order of preference: Extracting/editing/repacking a QEMU image directly before starting the emulator Running some sort of system-locale-changing APK on

How do I install a JRE or JDK to run the Android Developer Tools on Windows 7?

末鹿安然 提交于 2019-12-17 15:28:31
问题 I'm trying to install the Android Developer Tools on my Windows 7 computer, so that I can use the Android emulator to test websites. Android Developer's website, "Setting Up the ADT Bundle": The ADT Bundle provides everything you need to start developing apps... If you haven't already, go download the Android ADT Bundle. ... Install the SDK and Eclipse IDE Unpack the ZIP file (named adt-bundle-.zip) and save it to an appropriate location, such as a "Development" directory in your home

How to run Google Map API V2 on Android emulator

放肆的年华 提交于 2019-12-17 14:47:51
问题 I've tried to implement Google Maps v2 in my Android Application, but unfortunately instead of Maps I can see this message: This app won't run without Google Play Services, which are missing from your phone along with button "Get Google Play Services". Before tell me, is this possible to run Google Maps on Android emulator? 回答1: You should use an emulator based on SDK version 4.2.2 or higher. Look here for details: http://developer.android.com/google/play-services/setup.html Note: Only

Not able to launch android emulator

拈花ヽ惹草 提交于 2019-12-17 14:14:15
问题 When I run my hello world application, the android emulator fails to launch.Even when i am creating a new emulator it fails to launch giving me the following error. [2011-08-09 17:03:10 - Emulator] invalid command-line parameter: Files\Android\android-sdk\tools/emulator-arm.exe. [2011-08-09 17:03:10 - Emulator] Hint: use '@foo' to launch a virtual device named 'foo'. [2011-08-09 17:03:10 - Emulator] please use -help for more information 回答1: The problem is, that you have specified your SDK in

Mac and “PANIC: Missing emulator engine program for 'arm' CPU.”

廉价感情. 提交于 2019-12-17 13:59:11
问题 I am attempting to run an AVD I have created for API 16 on a Galaxy Nexus: emulator @Galaxy_Nexus_Jelly_Bean_API_16 which gives the error PANIC: Missing emulator engine program for 'arm' CPU. Attempting to start it by pressing the play button from the AVD Manager inside Android Studio bounces something briefly in the tool dock, but it quickly vanishes and nothing shows up and there are no obvious error messages. I have looked through other posts with similar problems. Most cite Avast on

What does this 4 line java code means in android application?

白昼怎懂夜的黑 提交于 2019-12-17 13:38:10
问题 In my java application i have this code @Override public void onAttachedToWindow() { this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG); super.onAttachedToWindow(); } when i build it for android 2.3 (level 10) it compiles and works fine. But when i build it for android 4.0 (level 15) it compiles and gives me crash at run time and following error 07-16 14:00:03.090: E/AndroidRuntime(29487): FATAL EXCEPTION: main 07-16 14:00:03.090: E/AndroidRuntime(29487): java.lang