Android编译后运行emulator注意事项

在编译完了,同一个shell执行emulator没有问题,但如果新开shell,会发现emualtor报错:

emulator: ERROR: You did not provide the name of an Android Virtual Device
with the '-avd ' option. Read -help-avd for more information.

If you *really* want to *NOT* run an AVD, consider using '-data '
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

你可能感兴趣的:(Android编译后运行emulator注意事项)