Showing posts with label android developer. Show all posts
Showing posts with label android developer. Show all posts

set up proxy for android emulator

c:\Users\lenger\AppData\Local\Android\Sdk\tools>emulator.exe -http-proxy ip:port -avd Nexus_5X_API_23

c:\Users\lenger\AppData\Local\Android\Sdk\tools>bin\avdmanager.bat list avd

    Name: Nexus_5X_API_23   Device: Nexus 5X (Google)     Path: C:\Users\lenger\.android\avd\Nexus_5X_API_23.avd   Target: Google APIs (Google Inc.)           Based on: Android 6.0 (Marshmallow) Tag/ABI: google_apis/x86_64     Skin: nexus_5x   Sdcard: 100M ---------     Name: Nexus_5X_API_23_2   Device: Nexus 5X (Google)     Path: C:\Users\lenger\.android\avd\Nexus_5X_API_23_2.avd   Target: Google APIs (Google Inc.)           Based on: Android 6.0 (Marshmallow) Tag/ABI: google_apis/armeabi-v7a     Skin: nexus_5x   Sdcard: 100M ---------     Name: Nexus_5X_API_27_x86   Device: Nexus 5X (Google)     Path: C:\Users\lenger\.android\avd\Nexus_5X_API_27_x86.avd   Target: Google APIs (Google Inc.)           Based on: Android API 27 Tag/ABI: google_apis/x86     Skin: nexus_5x   Sdcard: 800M Snapshot: no 

Install wechat for Android Emulator

down load wechat apk

https://apps.evozi.com/apk-downloader/?id=com.tencent.mm
wechat.apk

copy apk to

C:\Users\lenger\AppData\Local\Android\Sdk\platform-tools>

install via adb.exe

1 start a emulator
2 cmd.exe
cd C:\Users\lenger\AppData\Local\Android\Sdk\platform-tools>
adb.exe install com.tencent.mm.apk
com.tencent.mm.apk: 1 file pushed. 60.5 MB/s (42637973 bytes in 0.672s)
pkg: /data/local/tmp/com.tencent.mm.apk
Failure [INSTALL_FAILED_NO_MATCHING_ABIS]

It seems like we should use a armv7 emulator, but that has 10x slower on x86 host.
armeabi

adb.exe devices
adb.exe -s emulator install xxx.apk

ERROR: This AVD's configuration is missing a kernel file

emulator: ERROR: This AVD's configuration is missing a kernel file! Please ensure the file "kernel-ranchu" is in the same location as your system image.
emulator: ERROR: ANDROID_SDK_ROOT is undefined

Failure [INSTALL_FAILED_NO_MATCHING_ABIS


Failed to install ChromePublic.apk: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]

This issue happen on emulator more easier.
The reason is that the installed app might use NDK or native libs.
The native libs are most for arm cpu, when we try to run it on x86 emulator,
Such error will be encountered.

The easy way to fix it is change your emulator device with arm image.

How to fix gn Unexpected token error

Today I encountered a strange error when I try to compile latest android-chromium.


$gn gen --args='target_os="android"' out/Default
ERROR at //.gn:30:16: Unexpected token '{'
default_args = {

               ^

fixed: embedded-redis: Unable to run on macOS Sonoma

Issue you might see below error while trying to run embedded-redis for your testing on your macOS after you upgrade to Sonoma. java.la...