Welcome to Delicate template
Header
Just another WordPress site
Header

linux平台创建avd模拟器简约步骤

11月 3rd, 2022 | Posted by 无 名 in linux

sdkmanager –list
一:首先,您需要下载必要的软件包。为x86_64模拟器下载API 26软件包的示例:
sdkmanager “system-images;android-26;google_apis;x86_64” (sdkmanager –uninstall “system-images;android-26;google_apis;x86_64”)
二:然后接受许可协议
sdkmanager –licenses
三:然后创建您的模拟器
avdmanager create avd -n test -k “system-images;android-26;google_apis;x86_64”
四:下载android真正的SDK包
sdkmanager –install “platforms;android-26”
五:运行模拟器
emulator -avd test

安装apk到模拟器
adb install ./bin/AntTest-debug.apk
卸载apk
adb uninstall com.doodoobird.anttest

更多命令
查看已创建的模拟器列表
avdmanager list avd
删除模拟器
avdmanager delete avd -n test

错误:libpulse.so.0: cannot open shared object file: No such file or directory
解决:yum install pulseaudio

错误:libGL.so.1: cannot open shared object file: No such file or directory
解决:yum install mesa-libGL.x86_64

错误:libXcomposite.so.1: cannot open shared object file: No such file or directory
解决:yum install pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXtst.x86_64 cups-libs.x86_64 libXScrnSaver.x86_64 libXrandr.x86_64 GConf2.x86_64 alsa-lib.x86_64 atk.x86_64 gtk3.x86_64 -y

windows运行Appium
Appium下载:http://appium.io/
JDK下载:https://www.oracle.com/java/technologies/javase-downloads.html(安装1.8版本,版本太高后面有命令运行会报错)
commandlinetools下载:https://developer.android.com/studio/index.html

将commandlinetools放入f:\android\sdk目录(目录路径以及名称自定义)
命令提示符进入commandlinetools的bin目录
安装信息运行:sdkmanager –sdk_root=f:\android\sdk –list
安装build-tools:sdkmanager –sdk_root=f:\android\sdk “build-tools;26.0.0”
设置环境变量:F:\android\sdk\tools\bin;F:\android\sdk\platform-tools;F:\android\sdk\emulator,设置之后每次运行命令就可以不用进去对应的目录,也不用再加上–sdk_root参数了

错误:emulator: ERROR: x86_64 emulation currently requires hardware acceleration!CPU acceleration status:HAXM is not installed on this machine More info on configuring VM acceleration on Windows:
解决:安装intelhaxm-android.exe最新版

错误:adb: failed to install baidu.apk: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]

adb root
adb disable-verity
adb reboot
adb root
adb remount
adb push H:\软件库\genymotion\GenyFlash-master\original\system\bin\flash-archive.sh system/bin/
adb shell cat /system/bin/flash-archive.sh

安装ndk
sdkmanager –install “ndk;20.0.5594570”
系统变量:ANDROID_NDK_HOME -> F:\android\sdk\ndk\20.0.5594570
fyne package -os android -appID com.github.catya

You can follow any responses to this entry through the RSS 2.0 Both comments and pings are currently closed.