拷貝編譯好的android4.0源碼包,實現emulator
2012-12-27 09:45:24| 分類:
預設分類 |字型大小 訂閱
下載完成後主要包含一下目錄:
- abi bionic bootable build cts dalvik development device docs external frameworks hardware libcore Makefile ndk out packages prebuilt sdk system
Android ICS 模擬器的編譯
編譯模擬器版本和以前方法一樣:
- . build/envsetup.sh
- lunch sdk-eng
- make sdk -j2
編譯完成後工作目錄($TOP)裡增加了一個log檔案 v8.log
中間出問題:
collect2: ld returned 1 exit status
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libm_intermediates/LINKED/libm.so] 錯誤 1
make: *** 正在等待未完成的任務....
搜了篇文章:http://code.google.com/p/android/issues/detail?id=2031#c0
說是虛擬硬碟不夠大:
Resolved. In VMWare this was due to running out of disk space, and using a pre- built VMWare image. To fix, create a new VMWare image and set the disk space to be 12 G or so. Also set the VMWare virtual memory up to about 2G or more.增加硬碟空間吧
Android ICS 模擬器的啟動
還是老一套:
- $cd out/host/linux-x86/sdk/android-sdk_eng.xxx_linux-x86/tools
- $./android list targets
- Available Android targets:
- ----------
- id: 1 or "android-14"
- Name: Android 4.0
- Type: Platform
- API level: 14
- Revision: 2
- Skins: QVGA, WSVGA, HVGA, WVGA854, WXGA720, WQVGA432, WVGA800 (default), WQVGA400, WXGA800
- ABIs : armeabi-v7a
-
- $./android create avd -t 1 -n ics // t是指建立的模擬器的版本號碼,n是指模擬器的名字
- Auto-selecting single ABI armeabi-v7a
- Android 4.0 is a basic Android platform.
- Do you wish to create a custom hardware profile [no]
- Created AVD 'ics' based on Android 4.0, ARM (armeabi-v7a) processor,
- with the following hardware config:
- hw.lcd.density=240
- vm.heapSize=24
- hw.ramSize=512
-
- $./emulator -avd ics
於是 emulator就起來了:
轉自:http://qq530694013.blog.163.com/blog/static/2151230462012112632920527/