About Android Emulator Error - android-emulator

Output:
Hax is enabled Hax ram_size 0x60000000 HAX is working and emulator
runs in fast virt mode. emulator: Listening for console connections on
port: 5554 emulator: Serial number of this emulator (for ADB):
emulator-5554 emulator: WARNING:
./android/metrics/metrics_reporter_toolbar.cpp:189: Can't upload usage
metrics: Error
I opened the Android Emulator just appear this ERROR.
why? My application can run unaffected.

that's not a system problem, just a google usage statistics;
you can :
Open the Android Studio->Preferences, go to Appearance & Behavior->System Settings->Usage Statistics, and uncheck "Send usage statistics to Google". Now the matrics_reporter will be disabled during emulator starting.
then restart emulator, problem gone;

Related

Debug Flutter app is not working with VSCode on Xiaomi Device

I'm starting developing mobile using flutter on vscode IDE. I was debbuging the app using a samsung device, everything was ok, but I tryed debug the app using a xiaomi device, however this time i've got an error
Launching lib/main.dart on 166216e0 in debug mode...
Built build/app/outputs/flutter-apk/app-debug.apk.
adb: insufficient permissions for device: missing udev rules? user is in the plugdev group
See [http://developer.android.com/tools/device.html] for more information
Error: ADB exited with exit code 1
adb: insufficient permissions for device: missing udev rules? user is in the plugdev group
See [http://developer.android.com/tools/device.html] for more information
Error launching application on 166216e0.
Exited (sigterm)
There's a difference of android version. Samsung is android 11 and xiaomi is a MIUI Global 12.0.4 android 10.
apart from having usb debug enabled, i've enabled the option to install via usb and usb debugging.
I don't know how to solve this. Any suggestion?
I've updated SDK Manager adding android 10
after that i runned
flutter doctor --android-licenses
but I still not working

Android emulator on Windows Hypervisor Platform error on Hyper V enabled system

When I started emulator on my WIN 10 PRO with
Emulator -avd Android_Accelerated_X86_Oreo -partition-size 512 -feature WindowsHypervisorPlatform
i've got the error:
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Windows Hypervisor Platform (WHPX) is properly installed and usable.
#little-monkey
Unfortunately its no way to set it enabled becouse I dont have this option in menu like: properly options in WIN 10
I'd tried scf and dims to resolve error in Windows Update packages but it was useless. Thank you for help in advance!!!!

ionic framework can't load local notifications

I am taking Coursera's course for Multiplatform Mobile Devices and it says to call:
ionic plugin add de.appplant.cordova.plugin.local-notification
But I am getting the following error:
Toms-MBP:confusioncordova toddcoulson$ ionic platform add android
Error: Platform android already added.
Toms-MBP:confusioncordova toddcoulson$ ionic plugin add
de.appplant.cordova.plugin.local-notification Installing
"de.appplant.cordova.plugin.local-notification" for android
Installing "cordova-plugin-device" for android
Using this version of Cordova with older version of cordova-android
is being deprecated. Consider upgrading to cordova-android#5.0.0 or
newer.
Failed to install 'cordova-plugin-device':CordovaError: The provided
path
"/Users/toddcoulson/documents/coursera/fullstack/confusioncordova/platforms/android"
is not an Android project.
at new android_parser (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/metadata/android_parser.js:35:15)
at new PlatformApiPoly (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/platforms/PlatformApiPoly.js:62:20)
at Object.getPlatformApi (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/platforms/platforms.js:70:23)
at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:610:29)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:407:28
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:509:49
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
Failed to install
'de.appplant.cordova.plugin.local-notification':CordovaError: The
provided path
"/Users/toddcoulson/documents/coursera/fullstack/confusioncordova/platforms/android"
is not an Android project.
at new android_parser (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/metadata/android_parser.js:35:15)
at new PlatformApiPoly (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/platforms/PlatformApiPoly.js:62:20)
at Object.getPlatformApi (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/platforms/platforms.js:70:23)
at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:610:29)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:407:28
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:509:49
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
Error: The provided path
"/Users/toddcoulson/documents/coursera/fullstack/confusioncordova/platforms/android"
is not an Android project.
EDIT: I do think this is an issue getting the emulator for android to work. I thought I had things setup, but I never got the emulator working for android. Here is the error when running emulator:
Total time: 2.031 secs
Built the following apk(s):
/Users/toddcoulson/documents/coursera/fullstack/confusioncordova/platforms/android/build/outputs/apk/android-debug.apk
ANDROID_HOME=/Users/toddcoulson/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home
No emulator specified, defaulting to testOne
Waiting for emulator to start...
emulator: Requested console port 5584: Inferring adb port 5585.
Creating filesystem with parameters:
Size: 69206016
Block size: 4096
Blocks per group: 32768
Inodes per group: 4224
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 16896
Block groups: 1
Reserved block group size: 7 Created filesystem with 11/4224 inodes and 1302/16896 blocks emulator: WARNING: Camera name 'webcam0'
is not found in the list of connected cameras. Use '-webcam-list'
emulator option to obtain the list of connected camera names.
Hax is enabled Hax ram_size 0x77300000 HAX is working and emulator
runs in fast virt mode.
emulator: Listening for console connections on port: 5584 emulator:
Serial number of this emulator (for ADB): emulator-5584
[123145554325504]:WARNING:./android/base/files/IniFile.cpp:158:Failed
to process .ini file
/Users/toddcoulson/.android/emu-update-last-check.ini for reading.
Unknown hax vcpu return 1
Another EDIT:
I was able to get the plug-in to load once I had the android project setup with ionic and got Android Studio to load in an emulator. The emulator is still giving an error I put in the comments, but it did allow me to get past these errors.

Can not launch Emulator in Android

I have tried to launch the emulator in Android but I am getting the dialogue box displaying.
I have tried reading all the answers related to this but I have still failed.
emulator: WARNING: Crash service did not start
init: Could not find wglGetExtensionsStringARB!
getGLES1ExtensionString: Could not find GLES 1.x config!
Failed to obtain GLES 1.x extensions string!
emulator: WARNING: VM heap size set below hardware specified minimum of 128MB
emulator: WARNING: Setting VM heap size to 256MB
emulator: WARNING: Classic qemu does not support SMP. The hw.cpu.ncore option from your config file is ignored.
emulator: device fd:856
HAXM is working and emulator runs in fast virt mode
emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it.
Could not initialize emulated framebuffer
Screenshot

Google TV emulation starting up with a non Google TV image and emulator-arm

I have the latest Google TV Addon (rev 2) and the latest emulator. My linux box also supports KVM and when I pass the command kvm-ok, I do get the success messages
(INFO: Your CPU supports KVM extensions
INFO: /dev/kvm exists
KVM acceleration can be used)
I have created a new AVD via Eclipse using Android AVD and SDK Manager and by setting the Target Name as: Google Tv Addon
However, when I start up the AVD instance (command line or Eclipse), I see a normal Android smartphone instance loading up in the skin of the Google TV (see all the phone apps and nothing happens when I click on the TV specific buttons in the navigation bar). In the verbose logs I do NOT see KVM Auto enabled message and from the excerpts of logs (added below), it looks like the default kernel, system and userdata images are being loaded instead of the images from the /bin/android-sdk-linux_x86/add-ons/addon_google_tv_google_inc_12/images/x86. It also looks like emulator-arm is being executed instead of emulator-x86. Why is this happening? How could I solve this problem? I would greatly appreciate any help in this regard.
emulator: Android virtual device file at: <path>/.android/avd/name1.ini
emulator: virtual device content at <path>/.android/avd/name1.avd
emulator: virtual device config file: <path>/.android/avd/name1.avd/config.ini
emulator: using core hw config path: <path>/.android/avd/name1.avd/hardware-qemu.ini
emulator: Found AVD target API level: 12
emulator: found skin '720p' in directory: <path>/bin/android-sdk-linux_x86/add-ons/addon_google_tv_google_inc_12/skins
emulator: autoconfig: -skin 720p
emulator: autoconfig: -skindir <path>/bin/android-sdk-linux_x86/add-ons/addon_google_tv_google_inc_12/skins
emulator: keyset loaded from: <path>/.android/default.keyset
emulator: trying to load skin file '<path>/bin/android-sdk-linux_x86/add-ons/addon_google_tv_google_inc_12/skins/720p/layout'
emulator: skin network speed: 'full'
emulator: skin network delay: 'none'
emulator: autoconfig: -kernel <path>/bin/android-sdk-linux_x86/platforms/android-12/images//kernel-qemu
emulator: autoconfig: -ramdisk <path>/bin/android-sdk-linux_x86/platforms/android-12/images//ramdisk.img
emulator: Using initial system image: <path>/bin/android-sdk-linux_x86/platforms/android-12/images//system.img
emulator: autoconfig: -data <path>/.android/avd/name1.avd/userdata-qemu.img
emulator: autoconfig: -initdata <path>/.android/avd/name1.avd/userdata.img
emulator: autoconfig: -cache <path>/.android/avd/name1.avd/cache.img
emulator: Physical RAM size: 1024MB
Content of hardware configuration file:
hw.cpu.arch = arm
....................
Cheers,
S
For a workaround, please try editing the ~/.android/[AVD_name].avd/config.ini file, and change "arm" to "x86" for the hw.cpu.arch and abi.type lines.

Categories