Android编译后运行emulator注意事项
2016-03-31 本文已影响665人
difcareer
在编译完了,同一个shell执行emulator没有问题,但如果新开shell,会发现emualtor报错:
emulator: ERROR: You did not provide the name of an Android Virtual Device
with the '-avd <name>' option. Read -help-avd for more information.
If you *really* want to *NOT* run an AVD, consider using '-data <file>'
to specify a data partition image file (I hope you know what you're doing).
仔细对比前后两个shell中环境变量的差异,总结出新shell中需要手动设置的环境变量如下:
export ANDROID_PRODUCT_OUT=/home/aosp/AOSP/android-4.4.4_r1_modify/out/target/product/generic
export PATH=$PATH:/home/aosp/AOSP/android-4.4.4_r1_modify/out/host/linux-x86/bin
export ANDROID_BUILD_TOP=/home/aosp/AOSP/android-4.4.4_r1_modify