我 14:41:19you 为什么有人说我炫富有软...

搭建Ubuntu14.04编译环境并下载源码(二) - Linux编程 - 次元立方网 - 电脑知识与技术互动交流平台
搭建Ubuntu14.04编译环境并下载源码(二)
续上搭建Ubuntu14.04编译环境并下载源码(一)
今天临时买了个***的帐号,继续下载,翻墙的感觉还是不错的,推荐一下:/385947
使用repo sync时会经常中断,所以有人写了一个脚本,我就直接拿来用了download.sh,需要改下属性chomd a+x download.sh
#!/bin/bash
echo &======start repo sync======&
while [ $? == 1 ]; do
echo &======sync failed, re-sync again======&
使用./download.sh 代替repo sync效果更好
终于下载完成了,我下载的是android-4.0.1_r1的源码,大小有4.5G
下面要做的就是编译源码
根据网上找的资料,进入源码目录后第一步要做的就是执行:source build/envsetup.sh
root@ubuntu:/home/dzt/android/WO***NG_DIRECTORY# source build/envsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/samsung/tuna/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including sdk/bash_completion/adb.bash
root@ubuntu:/home/dzt/android/WO***NG_DIRECTORY# lunch 4
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.1
TARGET_PRODUCT=full_maguro
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ITL41D
============================================
第三步编译源码中的设置程序
&pre name=&code& class=&plain&&root@ubuntu:/home/dzt/android/WO***NG_DIRECTORY# mmm packages/apps/Settings/
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.1
TARGET_PRODUCT=full_maguro
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ITL41D
============================================
Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
Your version is: java version &1.8.0_05&.
The correct version is: Java SE 1.6.
Please follow the machine setup instructions at
/source/download.html
************************************************************
make: Entering directory `/home/dzt/android/WO***NG_DIRECTORY'
build/core/main.mk:131: *** stop.
make: Leaving directory `/home/dzt/android/WO***NG_DIRECTORY'
出错了,提示版本不对,我***的是1.8,但应用程序的是1.6,只好把1.8换成1.6。
root@ubuntu:/home/dzt# java -version
java version &1.6.0_45&
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) Server VM (build 20.45-b01, mixed mode)
重新编译,还是不行。
root@ubuntu:/home/dzt/android/WO***NG_DIRECTORY# mmm packages/apps/Settings/
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.1
TARGET_PRODUCT=full_maguro
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ITL41D
============================================
Checking build tools versions...
No private recovery resources for TARGET_DEVICE maguro
make: Entering directory `/home/dzt/android/WO***NG_DIRECTORY'
make: *** No rule to make target `out/host/linux-x86/bin/aapt', needed by `out/target/common/obj/APPS/Settings_intermediates/src/R.stamp'.
make: Leaving directory `/home/dzt/android/WO***NG_DIRECTORY'
进入源码目录,执行make -j2(cpu的核数,如果是4核就2乘4)单核就是-j2:
root@ubuntu:/home/dzt/android/WO***NG_DIRECTORY# make -j2
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.1
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ITL41D
============================================
host Java: jsr305lib (out/host/common/obj/J***A_LIBRARIES/jsr305lib_intermediates/classes)
Header: out/host/linux-x86/obj/include/libexpat/expat.h
Header: out/host/linux-x86/obj/include/libexpat/expat_external.h
Header: out/target/product/generic/obj/include/libexpat/expat.h
Header: out/target/product/generic/obj/include/libexpat/expat_external.h
Header: out/host/linux-x86/obj/include/libpng/png.h
Header: out/host/linux-x86/obj/include/libpng/pngconf.h
Header: out/host/linux-x86/obj/include/libpng/pngusr.h
Header: out/target/product/generic/obj/include/libpng/png.h
Header: out/target/product/generic/obj/include/libpng/pngconf.h
Header: out/target/product/generic/obj/include/libpng/pngusr.h
Header: out/target/product/generic/obj/include/libsonivox/eas.h
Header: out/target/product/generic/obj/include/libsonivox/eas_types.h
Header: out/target/product/generic/obj/include/libsonivox/eas_reverb.h
Header: out/target/product/generic/obj/include/libsonivox/jet.h
Header: out/target/product/generic/obj/include/libsonivox/ARM_synth_constants_gnu.inc
Header: out/target/product/generic/obj/include/libwpa_client/wpa_ctrl.h
Notice file: external/guava/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//framework/guavalib.jar.txt
host Java: antlr (out/host/common/obj/J***A_LIBRARIES/antlr_intermediates/classes)
Notice file: external/doclava/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//framework/doclava.jar.txt
target Java: core (out/target/common/obj/J***A_LIBRARIES/core_intermediates/classes)
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
host Java: dx (out/host/common/obj/J***A_LIBRARIES/dx_intermediates/classes)
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Notice file: dalvik/dx/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//bin/dx.txt
Notice file: frameworks/base/tools/aapt/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//bin/aapt.txt
Notice file: frameworks/base/libs/utils/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libutils.a.txt
Notice file: system/core/liblog/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/liblog.a.txt
Notice file: system/core/libcutils/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libcutils.a.txt
Notice file: external/expat/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libexpat.a.txt
Notice file: external/libpng/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libpng.a.txt
Yacc: aidl &= frameworks/base/tools/aidl/aidl_language_y.y
-o out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp frameworks/base/tools/aidl/aidl_language_y.y
touch out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.hpp
echo '#ifndef 'aidl_language_y_h & out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.h
echo '#define 'aidl_language_y_h && out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.h
cat out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.hpp && out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.h
echo '#endif' && out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.h
rm -f out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.hpp
Lex: aidl &= frameworks/base/tools/aidl/aidl_language_l.l
frameworks/base/tools/aidl/aidl_language_l.l:54: warning, rule cannot be matched
Notice file: frameworks/base/tools/aidl/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//bin/aidl.txt
Notice file: external/tinyxml/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libtinyxml.a.txt
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc -mthumb-interwork -Ibionic/libc/private -DCRT_LEGACY_WORKAROUND -Ibionic/libc/private -o out/target/product/generic/obj/lib/crtbegin_so.o -c bionic/libc/arch-arm/bionic/crtbegin_so.S
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gcc -mthumb-interwork -Ibionic/libc/private -DCRT_LEGACY_WORKAROUND -Ibionic/libc/private -o out/target/product/generic/obj/lib/crtend_so.o -c bionic/libc/arch-arm/bionic/crtend_so.S
Notice file: bionic/libc/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libc.so.txt
Notice file: bionic/libc/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libc_common.a.txt
Notice file: bionic/libdl/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libdl.so.txt
Notice file: bionic/libstdc++/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libstdc++.so.txt
Notice file: bionic/libm/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libm.so.txt
Notice file: system/core/liblog/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/liblog.so.txt
Notice file: system/core/liblog/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/liblog.a.txt
Notice file: system/core/libcutils/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libcutils.so.txt
Notice file: system/core/libcutils/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libcutils.a.txt
Notice file: frameworks/base/media/libmedia/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libmedia.so.txt
Notice file: frameworks/base/libs/ui/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libui.so.txt
Notice file: frameworks/base/libs/utils/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libutils.so.txt
Notice file: external/zlib/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libz.so.txt
Notice file: external/liblzf/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/liblzf.a.txt
Notice file: system/core/libpixelflinger/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libpixelflinger.so.txt
Notice file: hardware/libhardware_legacy/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libhardware_legacy.so.txt
Notice file: external/wpa_supplicant/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libwpa_client.so.txt
Notice file: system/core/libnetutils/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libnetutils.so.txt
Notice file: hardware/libhardware/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libhardware.so.txt
Notice file: external/skia/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libskia.so.txt
Notice file: external/freetype/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libft2.a.txt
Notice file: external/libpng/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libpng.a.txt
Notice file: external/giflib/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libgif.a.txt
Notice file: external/jpeg/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libjpeg.so.txt
Notice file: external/expat/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libexpat.so.txt
Notice file: external/sonivox/arm-wt-22k/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libsonivox.so.txt
Notice file: external/icu4c/common/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/libicuuc.so.txt
Notice file: external/icu4c/common/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libicuuc.so.txt
Notice file: system/core/libzipfile/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libzipfile.a.txt
Notice file: external/zlib/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libunz.a.txt
Directory: out/target/product/generic/root/sbin
Directory: out/target/product/generic/root/dev
Directory: out/target/product/generic/root/proc
Directory: out/target/product/generic/root/sys
Directory: out/target/product/generic/root/system
Directory: out/target/product/generic/root/data
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Directory: out/target/product/generic/data
Notice file: system/core/adb/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//bin/adb.txt
host Java: apkcheck (out/host/common/obj/J***A_LIBRARIES/apkcheck_intermediates/classes)
//中间部分打印省略
Can't locate Switch.pm in @INC (you may need to install the Switch module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
BEGIN failed--compilation aborted at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/html/DocTypeStrings.cpp] Error 2
make: *** Waiting for unfinished jobs....
解决办法:出现了两个错误,解决办法,***:libswitch-perl
root@ubuntu:/home/dzt/android/WO***NG_DIRECTORY# sudo apt-get install libswitch-perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
libswitch-perl
0 upgraded, 1 newly installed, 0 to remove and 272 not upgraded.
Need to get 19.2 kB of archives.
After this operation, 75.8 kB of additional disk space will be used.
Get:1 http://us./ubuntu/ trusty/universe libswitch-perl all 2.16-2 [19.2 kB]
Fetched 19.2 kB in 4s (3,940 B/s)
Selecting previously unselected package libswitch-perl.
(Reading database ... 178888 files and directories currently installed.)
Preparing to unpack .../libswitch-perl_2.16-2_all.deb ...
Unpacking libswitch-perl (2.16-2) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up libswitch-perl (2.16-2) ...
还是报错了
root@ubuntu:/home/dzt/android/WO***NG_DIRECTORY# make -j2
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.1
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ITL41D
============================================
host C: acp &= build/tools/acp/acp.c
host C++: libhost &= build/libs/host/pseudolocalize.cpp
&command-line&:0:0: warning: &_FORTIFY_SOURCE& redefined [enabled by default]
build/tools/acp/acp.c:1:0: note: this is the location of the previous definition
&command-line&:0:0: warning: &_FORTIFY_SOURCE& redefined [enabled by default]
build/libs/host/pseudolocalize.cpp:1:0: note: this is the location of the previous definition
#include &host/pseudolocalize.h&
host C: libhost &= build/libs/host/CopyFile.c
host C++: aapt &= frameworks/base/tools/aapt/AaptAssets.cpp
&command-line&:0:0: warning: &_FORTIFY_SOURCE& redefined [enabled by default]
build/libs/host/CopyFile.c:1:0: note: this is the location of the previous definition
build/libs/host/CopyFile.c: In function &isSameFile&:
build/libs/host/CopyFile.c:87:43: warning: unused parameter &pSrcStat& [-Wunused-parameter]
static bool isSameFile(const struct stat* pSrcStat, const struct stat* pDstStat)
build/libs/host/CopyFile.c:87:72: warning: unused parameter &pDstStat& [-Wunused-parameter]
static bool isSameFile(const struct stat* pSrcStat, const struct stat* pDstStat)
build/libs/host/CopyFile.c: In function &printNotNewerMsg&:
build/libs/host/CopyFile.c:105:42: warning: unused parameter &src& [-Wunused-parameter]
static void printNotNewerMsg(const char* src, const char* dst, unsigned int options)
build/libs/host/CopyFile.c: In function ©FileRecursive&:
build/libs/host/CopyFile.c:530:69: warning: unused parameter &isCmdLine& [-Wunused-parameter]
static int copyFileRecursive(const char* src, const char* dst, bool isCmdLine, unsigned int options)
&command-line&:0:0: warning: &_FORTIFY_SOURCE& redefined [enabled by default]
frameworks/base/tools/aapt/AaptAssets.cpp:1:0: note: this is the location of the previous definition
host C++: aapt &= frameworks/base/tools/aapt/Command.cpp
&command-line&:0:0: warning: &_FORTIFY_SOURCE& redefined [enabled by default]
frameworks/base/tools/aapt/Command.cpp:1:0: note: this is the location of the previous definition
frameworks/base/tools/aapt/AaptAssets.cpp:2161:1: warning: unused parameter &bundle& [-Wunused-parameter]
AaptAssets::slurpResourceZip(Bundle* bundle, const char* filename)
In file included from frameworks/base/include/utils/AssetManager.h:25:0,
from frameworks/base/tools/aapt/AaptAssets.h:10,
from frameworks/base/tools/aapt/AaptAssets.cpp:5:
frameworks/base/include/utils/KeyedVector.h: In instantiation of &const VALUE& android::DefaultKeyedVector&KEY, VALUE&::valueFor(const KEY&) const [with KEY = android::String8; VALUE = android::sp&AaptSymbols&]&:
frameworks/base/tools/aapt/AaptAssets.h:446:59:
required from here
frameworks/base/include/utils/KeyedVector.h:193:31: error: &indexOfKey& was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
ssize_t i = indexOfKey(key);
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base &android::KeyedVector&android::String8, android::sp&AaptSymbols& && are not found by unqualified lookup
frameworks/base/include/utils/KeyedVector.h:193:31: note: use &this-&indexOfKey& instead
frameworks/base/include/utils/KeyedVector.h: In instantiation of &const VALUE& android::DefaultKeyedVector&KEY, VALUE&::valueFor(const KEY&) const [with KEY = android::String8; VALUE = android::sp&AaptGroup&]&:
frameworks/base/tools/aapt/AaptAssets.cpp:1636:41:
required from here
frameworks/base/include/utils/KeyedVector.h:193:31: error: &indexOfKey& was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base &android::KeyedVector&android::String8, android::sp&AaptGroup& && are not found by unqualified lookup
frameworks/base/include/utils/KeyedVector.h:193:31: note: use &this-&indexOfKey& instead
frameworks/base/include/utils/KeyedVector.h: In instantiation of &const VALUE& android::DefaultKeyedVector&KEY, VALUE&::valueFor(const KEY&) const [with KEY = android::String8; VALUE = android::sp&AaptDir&]&:
frameworks/base/tools/aapt/AaptAssets.cpp:1700:53:
required from here
frameworks/base/include/utils/KeyedVector.h:193:31: error: &indexOfKey& was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base &android::KeyedVector&android::String8, android::sp&AaptDir& && are not found by unqualified lookup
frameworks/base/include/utils/KeyedVector.h:193:31: note: use &this-&indexOfKey& instead
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/AaptAssets.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from frameworks/base/include/utils/AssetManager.h:25:0,
from frameworks/base/tools/aapt/AaptAssets.h:10,
from frameworks/base/tools/aapt/Main.h:14,
from frameworks/base/tools/aapt/Command.cpp:6:
frameworks/base/include/utils/KeyedVector.h: In instantiation of &const VALUE& android::DefaultKeyedVector&KEY, VALUE&::valueFor(const KEY&) const [with KEY = android::String8; VALUE = android::sp&AaptSymbols&]&:
frameworks/base/tools/aapt/AaptAssets.h:446:59:
required from here
frameworks/base/include/utils/KeyedVector.h:193:31: error: &indexOfKey& was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
ssize_t i = indexOfKey(key);
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base &android::KeyedVector&android::String8, android::sp&AaptSymbols& && are not found by unqualified lookup
frameworks/base/include/utils/KeyedVector.h:193:31: note: use &this-&indexOfKey& instead
frameworks/base/include/utils/KeyedVector.h: In instantiation of &const VALUE& android::DefaultKeyedVector&KEY, VALUE&::valueFor(const KEY&) const [with KEY = android::String16; VALUE = unsigned int]&:
frameworks/base/tools/aapt/ResourceTable.h:485:100:
required from here
frameworks/base/include/utils/KeyedVector.h:193:31: error: &indexOfKey& was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base &android::KeyedVector&android::String16, unsigned int&& are not found by unqualified lookup
frameworks/base/include/utils/KeyedVector.h:193:31: note: use &this-&indexOfKey& instead
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/Command.o] Error 1
网上找到的解决办法:
error: &indexOfKey& was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
vi frameworks/base/libs/utils/.mk
Add '-fpermissive' to line 64:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base &android::KeyedVector&android::String8, android::sp&AaptDir& && are not found by unqualified lookup
frameworks/base/include/utils/KeyedVector.h:193:31: note: use &this-&indexOfKey& instead
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/AaptAssets.o] Error 1
vi frameworks/base/tools/aapt/.mk
Add '-fpermissive' to line 31:
LOCAL_CFLAGS += -Wno-format-y2k -fpermissive
使用命令make -j2还是报错了
external/srec/tools/thirdparty/OpenFst/fst/lib/factor-weight.h:288:40: note: declarations in dependent base &fst::CacheBaseImpl&fst::CacheState&fst::GallicArc&fst::StdArc, (fst::StringType)0u& & && are not found by unqualified lookup
external/srec/tools/thirdparty/OpenFst/fst/lib/factor-weight.h:288:40: note: use &this-&AddArc& instead
external/srec/tools/thirdparty/OpenFst/fst/lib/factor-weight.h:291:14: error: &SetArcs& was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
SetArcs(s);
external/srec/tools/thirdparty/OpenFst/fst/lib/factor-weight.h:291:14: note: declarations in dependent base &fst::CacheBaseImpl&fst::CacheState&fst::GallicArc&fst::StdArc, (fst::StringType)0u& & && are not found by unqualified lookup
external/srec/tools/thirdparty/OpenFst/fst/lib/factor-weight.h:291:14: note: use &this-&SetArcs& instead
In file included from external/srec/tools/thirdparty/OpenFst/fst/lib/arc.h:24:0,
from external/srec/tools/thirdparty/OpenFst/fst/lib/fst.h:23,
from external/srec/tools/grxmlcompile/grxmlcompile.cpp:24:
external/srec/tools/thirdparty/OpenFst/fst/lib/string-weight.h: In instantiation of &fst::StringWeight&L, S& fst::StringWeight&L, S&::Quantize(float) const [with L = fst::StringType S = (fst::StringType)2u]&:
external/srec/tools/thirdparty/OpenFst/fst/lib/product-weight.h:81:72:
required from &fst::ProductWeight&W1, W2& fst::ProductWeight&W1, W2&::Quantize(float) const [with W1 = fst::StringWeight&int, (fst::StringType)2u&; W2 = fst::TropicalWeight]&
external/srec/tools/thirdparty/OpenFst/fst/lib/determinize.h:366:27:
required from &void fst::DeterminizeFsaImpl&A, C&::AddArc(fst::DeterminizeFsaImpl&A, C&::StateId, fst::DeterminizeFsaImpl&A, C&::Label, fst::DeterminizeFsaImpl&A, C&::Subset*) [with A = fst::GallicArc&fst::StdArc, (fst::StringType)2u&; C = fst::GallicCommonDivisor&int, fst::TropicalWeight, (fst::StringType)2u, fst::DefaultCommonDivisor&fst::TropicalWeight& &; fst::DeterminizeFsaImpl&A, C&::StateId = fst::DeterminizeFsaImpl&A, C&::Label = fst::DeterminizeFsaImpl&A, C&::Subset = __gnu_cxx::slist&fst::DeterminizeFsaImpl&fst::GallicArc&fst::StdArc, (fst::StringType)2u&, fst::GallicCommonDivisor&int, fst::TropicalWeight, (fst::StringType)2u, fst::DefaultCommonDivisor&fst::TropicalWeight& & &::Element, std::allocator&fst::DeterminizeFsaImpl&fst::GallicArc&fst::StdArc, (fst::StringType)2u&, fst::GallicCommonDivisor&int, fst::TropicalWeight, (fst::StringType)2u, fst::DefaultCommonDivisor&fst::TropicalWeight& & &::Element& &]&
external/srec/tools/thirdparty/OpenFst/fst/lib/determinize.h:296:44:
required from &void fst::DeterminizeFsaImpl&A, C&::Expand(fst::DeterminizeFsaImpl&A, C&::StateId) [with A = fst::GallicArc&fst::StdArc, (fst::StringType)2u&; C = fst::GallicCommonDivisor&int, fst::TropicalWeight, (fst::StringType)2u, fst::DefaultCommonDivisor&fst::TropicalWeight& &; fst::DeterminizeFsaImpl&A, C&::StateId = int]&
external/srec/tools/grxmlcompile/grxmlcompile.cpp:938:1:
required from here
external/srec/tools/thirdparty/OpenFst/fst/lib/string-weight.h:110:22: warning: unused parameter &delta& [-Wunused-parameter]
StringWeight&L, S& Quantize(float delta = kDelta) const {
In file included from external/srec/tools/thirdparty/OpenFst/fst/lib/arcsort.h:24:0,
from external/srec/tools/thirdparty/OpenFst/fst/lib/fstlib.h:54,
from external/srec/tools/grxmlcompile/grxmlcompile.cpp:25:
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h: In instantiation of &S* fst::CacheBaseImpl&S&::ExtendState(fst::CacheBaseImpl&S&::StateId) [with S = fst::CacheState&fst::GallicArc&fst::StdArc, (fst::StringType)0u& &; fst::CacheBaseImpl&S&::StateId = int]&:
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:165:29:
required from &void fst::CacheBaseImpl&S&::SetFinal(fst::CacheBaseImpl&S&::StateId, fst::CacheBaseImpl&S&::Weight) [with S = fst::CacheState&fst::GallicArc&fst::StdArc, (fst::StringType)0u& &; fst::CacheBaseImpl&S&::StateId = fst::CacheBaseImpl&S&::Weight = fst::GallicWeight&int, fst::TropicalWeight, (fst::StringType)0u&]&
external/srec/tools/thirdparty/OpenFst/fst/lib/factor-weight.h:197:22:
required from &fst::FactorWeightFstImpl&A, F&::Weight fst::FactorWeightFstImpl&A, F&::Final(fst::FactorWeightFstImpl&A, F&::StateId) [with A = fst::GallicArc&fst::StdArc, (fst::StringType)0u&; F = fst::GallicFactor&int, fst::TropicalWeight, (fst::StringType)0u&; fst::FactorWeightFstImpl&A, F&::Weight = fst::GallicWeight&int, fst::TropicalWeight, (fst::StringType)0u&; fst::FactorWeightFstImpl&A, F&::StateId = int]&
external/srec/tools/thirdparty/OpenFst/fst/lib/factor-weight.h:362:64:
required from &fst::FactorWeightFst&A, F&::Weight fst::FactorWeightFst&A, F&::Final(fst::FactorWeightFst&A, F&::StateId) const [with A = fst::GallicArc&fst::StdArc, (fst::StringType)0u&; F = fst::GallicFactor&int, fst::TropicalWeight, (fst::StringType)0u&; fst::FactorWeightFst&A, F&::Weight = fst::GallicWeight&int, fst::TropicalWeight, (fst::StringType)0u&; fst::FactorWeightFst&A, F&::StateId = int]&
external/srec/tools/grxmlcompile/grxmlcompile.cpp:938:1:
required from here
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:132:26: error: &SetState& was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
SetState(s, new S);
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:132:26: note: declarations in dependent base &fst::VectorFstBaseImpl&fst::CacheState&fst::GallicArc&fst::StdArc, (fst::StringType)0u& & && are not found by unqualified lookup
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:132:26: note: use &this-&SetState& instead
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:136:61: error: &SetState& was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
SetState(cache_first_state_id_, cache_first_state_);
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:136:61: note: declarations in dependent base &fst::VectorFstBaseImpl&fst::CacheState&fst::GallicArc&fst::StdArc, (fst::StringType)0u& & && are not found by unqualified lookup
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:136:61: note: use &this-&SetState& instead
In file included from external/srec/tools/thirdparty/OpenFst/fst/lib/dfs-visit.h:24:0,
from external/srec/tools/thirdparty/OpenFst/fst/lib/test-properties.h:27,
from external/srec/tools/thirdparty/OpenFst/fst/lib/vector-fst.h:27,
from external/srec/tools/thirdparty/OpenFst/fst/lib/fstlib.h:50,
from external/srec/tools/grxmlcompile/grxmlcompile.cpp:25:
external/srec/tools/thirdparty/OpenFst/fst/lib/arcfilter.h: In instantiation of &bool fst::AnyArcFilter&A&::operator()(const A&) const [with A = fst::GallicArc&fst::StdArc, (fst::StringType)2u&]&:
external/srec/tools/thirdparty/OpenFst/fst/lib/dfs-visit.h:124:22:
required from &void fst::DfsVisit(const fst::Fst&A&&, V*, ArcFilter) [with Arc = fst::GallicArc&fst::StdArc, (fst::StringType)2u&; V = fst::SccVisitor&fst::GallicArc&fst::StdArc, (fst::StringType)2u& &; ArcFilter = fst::AnyArcFilter&fst::GallicArc&fst::StdArc, (fst::StringType)2u& &]&
external/srec/tools/thirdparty/OpenFst/fst/lib/dfs-visit.h:159:45:
required from &void fst::DfsVisit(const fst::Fst&A&&, V*) [with Arc = fst::GallicArc&fst::StdArc, (fst::StringType)2u&; V = fst::SccVisitor&fst::GallicArc&fst::StdArc, (fst::StringType)2u& &]&
external/srec/tools/thirdparty/OpenFst/fst/lib/test-properties.h:105:31:
required from &uint64 fst::ComputeProperties(const fst::Fst&A&&, uint64, uint64*, bool) [with Arc = fst::GallicArc&fst::StdArc, (fst::StringType)2u&; uint64 = long long unsigned int]&
external/srec/tools/thirdparty/OpenFst/fst/lib/test-properties.h:232:70:
required from &uint64 fst::TestProperties(const fst::Fst&A&&, uint64, uint64*) [with Arc = fst::GallicArc&fst::StdArc, (fst::StringType)2u&; uint64 = long long unsigned int]&
external/srec/tools/thirdparty/OpenFst/fst/lib/factor-weight.h:376:62:
required from &uint64 fst::FactorWeightFst&A, F&::Properties(uint64, bool) const [with A = fst::GallicArc&fst::StdArc, (fst::StringType)2u&; F = fst::GallicFactor&int, fst::TropicalWeight, (fst::StringType)2u&; uint64 = long long unsigned int]&
external/srec/tools/grxmlcompile/grxmlcompile.cpp:938:1:
required from here
external/srec/tools/thirdparty/OpenFst/fst/lib/arcfilter.h:28:8: warning: unused parameter &arc& [-Wunused-parameter]
bool operator()(const A &arc) const { }
In file included from external/srec/tools/thirdparty/OpenFst/fst/lib/test-properties.h:26:0,
from external/srec/tools/thirdparty/OpenFst/fst/lib/vector-fst.h:27,
from external/srec/tools/thirdparty/OpenFst/fst/lib/fstlib.h:50,
from external/srec/tools/grxmlcompile/grxmlcompile.cpp:25:
external/srec/tools/thirdparty/OpenFst/fst/lib/connect.h: In instantiation of &bool fst::SccVisitor&A&::TreeArc(fst::SccVisitor&A&::StateId, const A&) [with A = fst::GallicArc&fst::StdArc, (fst::StringType)2u&; fst::SccVisitor&A&::StateId = int]&:
external/srec/tools/thirdparty/OpenFst/fst/lib/dfs-visit.h:132:15:
required from &void fst::DfsVisit(const fst::Fst&A&&, V*, ArcFilter) [with Arc = fst::GallicArc&fst::StdArc, (fst::StringType)2u&; V = fst::SccVisitor&fst::GallicArc&fst::StdArc, (fst::StringType)2u& &; ArcFilter = fst::AnyArcFilter&fst::GallicArc&fst::StdArc, (fst::StringType)2u& &]&
external/srec/tools/thirdparty/OpenFst/fst/lib/dfs-visit.h:159:45:
required from &void fst::DfsVisit(const fst::Fst&A&&, V*) [with Arc = fst::GallicArc&fst::StdArc, (fst::StringType)2u&; V = fst::SccVisitor&fst::GallicArc&fst::StdArc, (fst::StringType)2u& &]&
external/srec/tools/thirdparty/OpenFst/fst/lib/test-properties.h:105:31:
required from &uint64 fst::ComputeProperties(const fst::Fst&A&&, uint64, uint64*, bool) [with Arc = fst::GallicArc&fst::StdArc, (fst::StringType)2u&; uint64 = long long unsigned int]&
external/srec/tools/thirdparty/OpenFst/fst/lib/test-properties.h:232:70:
required from &uint64 fst::TestProperties(const fst::Fst&A&&, uint64, uint64*) [with Arc = fst::GallicArc&fst::StdArc, (fst::StringType)2u&; uint64 = long long unsigned int]&
external/srec/tools/thirdparty/OpenFst/fst/lib/factor-weight.h:376:62:
required from &uint64 fst::FactorWeightFst&A, F&::Properties(uint64, bool) const [with A = fst::GallicArc&fst::StdArc, (fst::StringType)2u&; F = fst::GallicFactor&int, fst::TropicalWeight, (fst::StringType)2u&; uint64 = long long unsigned int]&
external/srec/tools/grxmlcompile/grxmlcompile.cpp:938:1:
required from here
external/srec/tools/thirdparty/OpenFst/fst/lib/connect.h:102:8: warning: unused parameter &s& [-Wunused-parameter]
bool TreeArc(StateId s, const A &arc) { }
external/srec/tools/thirdparty/OpenFst/fst/lib/connect.h:102:8: warning: unused parameter &arc& [-Wunused-parameter]
make: *** [&span style=&color:#ff0000;&&out/host/linux-x86/obj/EXECUTABLES/grxmlcompile_intermediates/grxmlcompile.o&/span&] Error 1
make: *** Waiting for unfinished jobs....
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:132:26: note: declarations in dependent base &fst::VectorFstBaseImpl&fst::CacheState&fst::GallicArc&fst::StdArc, (fst::StringType)0u& & && are not found by unqualified lookup
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:132:26: note: use &this-&SetState& instead
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:136:61: error: &SetState& was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
SetState(cache_first_state_id_, cache_first_state_);
make: *** [out/host/linux-x86/obj/EXECUTABLES/grxmlcompile_intermediates/grxmlcompile.o] Error 1
解决办法:
cd external/srec
wget &/CyanogenMod/android_external_srec/commit/4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff&
patch -p1 & 4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff
rm -f 4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff
dalvik/vm/native/dalvik_system_Zygote.cpp:216:43: error: &setrlimit& was not declared in this scope
err = setrlimit(contents[0], &rlim);
&command-line&:0:0: warning: &_FORTIFY_SOURCE& redefined [enabled by default]
dalvik/vm/native/java_lang_Float.cpp:1:0: note: this is the location of the previous definition
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libdvm_intermediates/native/dalvik_system_Zygote.o] Error 1
make: *** Waiting for unfinished jobs....
添加头文件#include &sys/resource.h&到以下文件
dalvik/vm/native/dalvik_system_Zygote.cpp
host C: libdiskconfig_host &= system/core/libdiskconfig/diskconfig.c
cc1: all warnings being treated as errors
&command-line&:0:0: error: &_FORTIFY_SOURCE& redefined [-Werror]
make: *** [out/host/linux-x86/obj/EXECUTABLES/editdisklbl_intermediates/editdisklbl.o] Error 1
make: *** Waiting for unfinished jobs....
system/core/libdiskconfig/diskconfig.c:1:0: note: this is the location of the previous definition
/* libs/diskconfig/diskconfig.c
cc1: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libdiskconfig_host_intermediates/diskconfig.o] Error 1
gcc和g++版本太高了
sudo apt-get install gcc-4.4
sudo apt-get install g++-4.4
sudo rm -rf /usr/bin/gcc /usr/bin/g++
sudo ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
sudo ln -s /usr/bin/g++-4.4 /usr/bin/g++
把默认的4.6版本换为了4.4,继续编译源码make -j2
漫长的等待........................................
编译了大半天,结果还是没通过
make: *** [out/host/common/obj/J***A_LIBRARIES/core-tests-hostdex_intermediates/classes.dex] Killed
make: *** Waiting for unfinished jobs....
根据网上的说法是有可能内存不够了
解决办法:虚拟机内存不够,增大内存试试
还是报了以下问题:
target C++: libbcc &= frameworks/compile/libbcc/lib/ExecutionEngine/bcc.cpp
target C: libbcc &= out/target/product/vbox_x86/obj/SHARED_LIBRARIES/libbcc_intermediates/libbcc-stamp.c
i686-android-linux-gcc: Internal error: Killed (program cc1)
Please submit a full bug report.
See &http://gcc.gnu.org/bugs.html& for instructions.
make: *** [out/target/product/vbox_x86/obj/SHARED_LIBRARIES/libbcc_intermediates/libbcc-stamp.o] Error 1
make: *** Waiting for unfinished jobs....
再尝试增大存储空间
'out/target/common/obj/J***A_LIBRARIES/services_intermediates//classes.dex' as 'classes.dex'...
Install: out/target/product/vbox_x86/system/bin/system_server
Install: out/target/product/vbox_x86/system/lib/libfilterpack_imageproc.so
target Strip: libwebcore (out/target/product/vbox_x86/obj/lib/libwebcore.so)
make: *** [out/target/product/vbox_x86/obj/lib/libwebcore.so] Error 1
make: *** Waiting for unfinished jobs....
解决办法:
Ubuntu系统没加swap分区
root@ubuntu:/home/dzt/android/WO***NG_DIRECTORY# dd if=/dev/zero of=/opt/moreswap bs=1024 count=512k
records in
records out
bytes (537 MB) copied, 54.2059 s, 9.9 MB/s
root@ubuntu:/home/dzt/android/WO***NG_DIRECTORY# mkswap /opt/moreswap
Setting up swapspace version 1, size = 524284 KiB
no label, UUID=6916a5ef-2b51--6ac7a1edcc0d
root@ubuntu:/home/dzt/android/WO***NG_DIRECTORY# swapon /opt/moreswap
root@ubuntu:/home/dzt/android/WO***NG_DIRECTORY# gedit /etc/fstab
把这句话添加到最后一行
/opt/moreswap none swap sw 0 0
root@ubuntu:/home/dzt/android/WO***NG_DIRECTORY# swapon -s
Filename Type Size Used Priority
/dev/sda5 partition 872 -1
/opt/moreswap file
host Executable: emulator_renderer (out/host/linux-x86/obj/EXECUTABLES/emulator_renderer_intermediates/emulator_renderer)
/usr/bin/ld: out/host/linux-x86/obj/EXECUTABLES/emulator_renderer_intermediates/main.o: undefined reference to symbol 'XInitThreads'
//usr/lib/i386-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_renderer_intermediates/emulator_renderer] Error 1
make: *** Waiting for unfinished jobs....
解决办法:
修改development/tools/emulator/opengl/host/renderer/Android.mk文件
root@ubuntu:/home/dzt/android/WO***NG_DIRECTORY# ls
abi cts docs frameworks Makefile prebuilt
bionic dalvik download.sh hardware ndk sdk
bootable development download.sh~ hs_err_pid6190.log out system
build device external libcore packages v8.log
root@ubuntu:/home/dzt/android/WO***NG_DIRECTORY# gedit development/tools/emulator/opengl/host/renderer/Android.mk
添加一行:LOCAL_LDLIBS += -lX11 注意最好是复制过去,右边的容易写错
由于机器配置的问题,经过多次make -j4,终于成功了
最后对单个设置模块源码进行编译
root@ubuntu:/home/dzt/android/WO***NG_DIRECTORY# source build/envsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/samsung/tuna/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including sdk/bash_completion/adb.bash
root@ubuntu:/home/dzt/android/WO***NG_DIRECTORY# lunch 3
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.1
TARGET_PRODUCT=vbox_x86
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=x86
TARGET_ARCH_VARIANT=x86
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ITL41D
============================================
root@ubuntu:/home/dzt/android/WO***NG_DIRECTORY# mmm packages/apps/Settings/
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.1
TARGET_PRODUCT=vbox_x86
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=x86
TARGET_ARCH_VARIANT=x86
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ITL41D
============================================
make: Entering directory `/home/dzt/android/WO***NG_DIRECTORY'
target R.java/Manifest.java: Settings (out/target/common/obj/APPS/Settings_intermediates/src/R.stamp)
(skipping backup file 'packages/apps/Settings/res/values-zh-rCN/strings.xml~')
target Java: Settings (out/target/common/obj/APPS/Settings_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Copying: out/target/common/obj/APPS/Settings_intermediates/classes-jarjar.jar
Copying: out/target/common/obj/APPS/Settings_intermediates/emma_out/lib/classes-jarjar.jar
Copying: out/target/common/obj/APPS/Settings_intermediates/classes.jar
Copying: out/target/common/obj/APPS/Settings_intermediates/noproguard.classes.jar
target Dex: Settings
Copying: out/target/common/obj/APPS/Settings_intermediates/noproguard.classes.dex
target Package: Settings (out/target/product/vbox_x86/obj/APPS/Settings_intermediates/package.apk)
(skipping backup file 'packages/apps/Settings/res/values-zh-rCN/strings.xml~')
'out/target/common/obj/APPS/Settings_intermediates//classes.dex' as 'classes.dex'...
Install: out/target/product/vbox_x86/system/app/Settings.apk
target Java: SettingsTests (out/target/common/obj/APPS/SettingsTests_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Copying: out/target/common/obj/APPS/SettingsTests_intermediates/classes-jarjar.jar
Copying: out/target/common/obj/APPS/SettingsTests_intermediates/emma_out/lib/classes-jarjar.jar
Copying: out/target/common/obj/APPS/SettingsTests_intermediates/classes.jar
Copying: out/target/common/obj/APPS/SettingsTests_intermediates/noproguard.classes.jar
target Dex: SettingsTests
Copying: out/target/common/obj/APPS/SettingsTests_intermediates/noproguard.classes.dex
target Package: SettingsTests (out/target/product/vbox_x86/obj/APPS/SettingsTests_intermediates/package.apk)
'out/target/common/obj/APPS/SettingsTests_intermediates//classes.dex' as 'classes.dex'...
Install: out/target/product/vbox_x86/data/app/SettingsTests.apk
make: Leaving directory `/home/dzt/android/WO***NG_DIRECTORY'
使用lunch命令时要注意,后面带的数字
root@ubuntu:/home/dzt/android/WO***NG_DIRECTORY# lunch
You're building on
Lunch menu... pick a combo:
1. full-eng
2. full_x86-eng
3. vbox_x86-eng
4. full_maguro-userdebug
5. full_tuna-userdebug
6. full_panda-eng
Which would you like? [full-eng]
我选择的是3. vbox_x86-eng就直接输入lunch 3
环境搭建好了,可以对源码进行二次开发,可以定制自己的系统样式,学习优秀的代码。这个环境搭建真不容易!
Android编译环境搭建和源码编译总结:
编译的过程中不知使用了多少次make -j2这个命令,每改一个问题就make一次,每次make都需要花很多时间。每个人碰到的问题都不一样,千奇百怪,但基本每个问题都能在网上找到解决办法,把问题在网上一搜就能找出好多***,要具体问题具体分析。
延伸阅读:
Homebrew命令详解作者:chszs,未经博主允许不得转载...
本教程为 李华明 编著的iOS-Cocos2d游戏开发系列教程:教程涵盖关于i......
专题主要学习DirectX的初级编程入门学习,对Directx11的入门及初学者有......
&面向对象的JavaScript&这一说法多少有些冗余,因为JavaScript 语言本......
Windows7系统专题 无论是升级操作系统、资料备份、加强资料的安全及管......

参考资料

 

随机推荐