1. 程式人生 > >Android 編譯錯誤總結及收集

Android 編譯錯誤總結及收集

收集和遇到的部分error,先記錄如下,改天按照建立android及使用情景分類整理。以後遇到的在慢慢新增進來

1.編譯錯誤:

/usr/bin/ldcannotfind -lz”

解決方法:

需要安裝zlib-dev這個包,線上安裝命令為:apt-getinstall zlib1g-dev

2.編譯錯誤:

frameworks/base/libs/utils/RefBase.cpp:483:67:error: passing ‘const android::RefBase::weakref_impl’ as ‘this’argument of ‘void android::RefBase::weakref_impl::trackMe(bool,bool)’ discards qualifiers [-fpermissive]
make: ***[out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase.o]Error 1

解決方法:

$gedit frameworks/base/libs/utils/Android.mk

修改以下語句

LOCAL_CFLAGS+= -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)

LOCAL_CFLAGS+= -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) –fpermissive

3.編譯錯誤:

arm-eabi-gcc:error trying to exec 'cc1': execvp: No such file or directory
make:*** [out/target/product/generic/obj/lib/crtbegin_dynamic.o] Error 1

解決方法:

如果之前的依賴包都已經安裝成功的話,此處應該是交叉編譯工具許可權的問題。這個問題只要在文章開頭lunch時執行了賦予許可權命令,就應該不會遇到了。

4.編譯錯誤:

<command-line>:0:0:error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>:0:0: note: this is the location of the previousdefinition
cc1plus: all warnings being treated as errors
make:*** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o]Error 1

此處編譯錯誤是由於ubuntu11.10採用了GCC4.6.1導致的。

解決方法:

修改原始碼目錄下/build/core/combo/HOST_linux-x86.mk檔案:

將以下語句

HOST_GLOBAL_CFLAGS+= -D_FORTIFY_SOURCE=0

修改為

HOST_GLOBAL_CFLAGS+= -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0

5.編譯錯誤:

make:***[out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs_export_foreach.o]錯誤1

解決辦法:

找到frameworks/compile/slang/slang_rs_export_foreach.cpp:247行,並將本行註釋掉即可繼續編譯。

make:*** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o]Error 1

後來發現了,原來是11.10裡的gccg++版本太高了,於是執行下面的操作:

sudoapt-get install gcc-4.4

sudoapt-get install g++-4.4

sudorm -rf /usr/bin/gcc /usr/bin/g++

sudoln -s /usr/bin/gcc-4.4 /usr/bin/gcc

sudoln -s /usr/bin/g++-4.4 /usr/bin/g++

把預設的4.6版本換為了4.4,繼續編譯原始碼,又出現了另一個錯誤,大致提示為:

g++selected multilib '32' not installed

繼續奮戰吧,安裝相應的工具吧:sudoapt-get install g++-4.4-multilib,現在正在make-j8在我的i5/4G機子裡跑著。

make:***[out/host/linux-x86/obj/STATIC_LIBRARIES/libMesa_intermediates/src/glsl/linker.o]Error 1

解決這個問題需要修改檔案如下:

"#include<stddef.h>"新增到linker.cpp檔案頭部。

這樣就可以編譯完成了。

6.錯誤:

error:‘ptrdiff_t’ does not name a type
In file included fromexternal/gtest/src/../include/gtest/gtest-param-test.h:157:0,
                from external/gtest/src/../include/gtest/gtest.h:69,
                fromexternal/gtest/src/gtest_main.cc:32:
external/gtest/src/../include/gtest/internal/gtest-param-util.h:122:11:error: ‘ptrdiff_t’ does not name a type
In file included fromexternal/gtest/src/../include/gtest/gtest-param-test.h:157:0,
                from external/gtest/src/../include/gtest/gtest.h:69,
                from external/gtest/src/../src/gtest.cc:34,
                fromexternal/gtest/src/gtest-all.cc:36:
external/gtest/src/../include/gtest/internal/gtest-param-util.h:122:11:error: ‘ptrdiff_t’ does not name a type
In file included fromexternal/gtest/src/gtest-all.cc:38:0:
解決方法:
$viexternal/gtest/src/../include/gtest/internal/gtest-param-util.h
#include<cstddef>

7.錯誤:

undefinedreference to `pthread_mutexattr_destroy'
host C++: libgtest_host<= external/gtest/src/gtest-all.cc
true
host C++:libgtest_main_host <=external/gtest/src/gtest_main.cc
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Signals.o):In function`PrintStackTrace':
/home/aa/project/android4.0.1/external/llvm/lib/Support/Unix/Signals.inc:219:undefined reference to`dladdr'
/home/aa/project/android4.0.1/external/llvm/lib/Support/Unix/Signals.inc:231:undefined reference to`dladdr'
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Threading.o):In function `llvm::llvm_execute_on_thread(void (*)(void*), void*,unsignedint)':
/home/aa/project/android4.0.1/external/llvm/lib/Support/Threading.cpp:96:undefined reference to`pthread_create'
/home/aa/project/android4.0.1/external/llvm/lib/Support/Threading.cpp:91:undefined reference to`pthread_attr_setstacksize'
/home/aa/project/android4.0.1/external/llvm/lib/Support/Threading.cpp:100:undefined reference to`pthread_join'
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Mutex.o):In function`MutexImpl':
/home/aa/project/android4.0.1/external/llvm/lib/Support/Mutex.cpp:69:undefined reference to`pthread_mutexattr_init'
/home/aa/project/android4.0.1/external/llvm/lib/Support/Mutex.cpp:75:undefined reference to`pthread_mutexattr_settype'
/home/aa/project/android4.0.1/external/llvm/lib/Support/Mutex.cpp:80:undefined reference to`pthread_mutexattr_setpshared'
/home/aa/project/android4.0.1/external/llvm/lib/Support/Mutex.cpp:89:undefined reference to`pthread_mutexattr_destroy'
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Mutex.o):In function`llvm::sys::MutexImpl::tryacquire()':
/home/aa/project/android4.0.1/external/llvm/lib/Support/Mutex.cpp:143:undefined reference to `pthread_mutex_trylock'
collect2: ldreturned 1 exit status
make: ***[out/host/linux-x86/obj/EXECUTABLES/test-librsloader_intermediates/test-librsloader]Error 1
make: *** Waiting for unfinished jobs....
解決方法:
$viexternal/llvm/llvm-host-build.mk
LOCAL_LDLIBS := -lpthread-ldl
下面這個解決方法沒成功,會有新的錯誤:errorsagain :can't find threads.h file or dir.
$ viexternal/llvm/lib/Support/Android.mk
LOCAL_C_INCLUDES +=system/core/include/cutils
LOCAL_SHARED_LIBRARIES := libcutil
$vi external/llvm/lib/Support/Mutex.cpp
#include <threads.h>
$vi external/llvm/lib/Support/Threading.cpp
#include<threads.h>

8錯誤:

error:variable ‘ParamName’ set but not used[-Werror=unused-but-set-variable]
frameworks/compile/slang/slang_rs_export_foreach.cpp:247:23:error: variable ‘ParamName’ set but not used[-Werror=unused-but-set-variable]
cc1plus: all warnings beingtreated as errors
解決方法:
$vi frameworks/compile/slang/Android.mk
#local_cflags_for_slang :=-Wno-sign-promo -Wall -Wno-unused-parameter-Werror
local_cflags_for_slang := -Wno-sign-promo -Wall-Wno-unused-parameter

9.錯誤:

一、環境設定

[email protected]:~/Android/source$source build/envsetup.sh
includingdevice/htc/passion/vendorsetup.sh
includingdevice/samsung/crespo/vendorsetup.sh
[email protected]:~/Android/source$lunch full-eng

lunch時,如果提示permissiondenied許可權不夠的話,需要在原始碼根目錄下執行,賦予目錄下所有檔案許可權

[email protected]:~/Android/source$sudo chmod -R 777 *

這時候會lunch指令會打印出如下所示文段:

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.3
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GRI40
============================================

一、開始編譯

編譯過程可能會出現許多錯誤而中止,在此wayne將會把所有遇到的問題以及解決方法一一貼出來,以供以後參考。

10.錯誤:

[email protected]:~/Android/source$make-j2
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.3
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GRI40
============================================
Checkingbuild tools versions...
build/core/main.mk:76:************************************************************
build/core/main.mk:77:You are attempting to build on a 32-bitsystem.
build/core/main.mk:78: Only 64-bit build environments aresupported beyond froyo/2.2.
build/core/main.mk:79:************************************************************
build/core/main.mk:80:*** stop
。停止。

解決方法:cd到原始碼根目錄,執行:

$gedit build/core/main.mk

找到

ifneq(64,$(findstring 64,$(build_arch)))

將其修改為

ifneq(i686,$(findstring i686,$(build_arch)))

然後依次修改以下四個make檔案:

external/clearsilver/cgi/Android.mk
external/clearsilver/java-jni/Android.mk
external/clearsilver/util/Android.mk
external/clearsilver/cs/Android.mk

將其中的

LOCAL_CFLAGS+= -m64
LOCAL_LDFLAGS += -m64

修改為

LOCAL_CFLAGS+= -m32
LOCAL_LDFLAGS += -m32

11.錯誤:

frameworks/base/libs/utils/RefBase.cpp:483:67:error: passing ‘const android::RefBase::weakref_impl’ as ‘this’argument of ‘void android::RefBase::weakref_impl::trackMe(bool,bool)’ discards qualifiers [-fpermissive]
make: ***[out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase.o]Error 1

解決方法:

$gedit frameworks/base/libs/utils/Android.mk

修改以下語句

LOCAL_CFLAGS+= -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)

LOCAL_CFLAGS+= -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) –fpermissive

12.錯誤:

arm-eabi-gcc:error trying to exec 'cc1': execvp: No such file or directory
make:*** [out/target/product/generic/obj/lib/crtbegin_dynamic.o] Error 1

如果之前的依賴包都已經安裝成功的話,此處應該是交叉編譯工具許可權的問題。這個問題只要在文章開頭lunch時執行了賦予許可權命令,就應該不會遇到了。

13.錯誤:

<command-line>:0:0:error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>:0:0: note: this is the location of the previousdefinition
cc1plus: all warnings being treated as errors
make:*** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o]Error 1

此處編譯錯誤是由於ubuntu11.10採用了GCC4.6.1導致的。

解決方法:

修改原始碼目錄下/build/core/combo/HOST_linux-x86.mk檔案:

將以下語句

HOST_GLOBAL_CFLAGS+= -D_FORTIFY_SOURCE=0

修改為

HOST_GLOBAL_CFLAGS+= -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0

編譯時還有可能出現類似的錯誤,根據錯誤提示的關鍵詞比如g++錯誤、jre錯誤等,都是些細節問題,比較好解決。

經過兩小時左右的等待後,終於順利完成。編譯成功後會生成system.img等映象檔案,下面是編譯完成提示:

Targetsystem fs image:out/target/product/generic/obj/PACKAGING/systemimage_intermediates/system.img
Installsystem fs image: out/target/product/generic/system.img
Installedfile list: out/target/product/generic/installed-files.txt

三、啟動所編譯的系統

編譯完之後會在out/target/product/generic目錄下生成system.imgramdisk.img userdata.img三個映象檔案。

在啟動模擬器之前,需要先為模擬器系統設定環境變數,執行gedit~/.bashrc,新增環境變數如下:

exportANDROID_PRODUCT_OUT=~/Android/source/out/target/product/generic
ANDROID_PRODUCT_OUT_BIN=~/Android/source/out/host/linux-x86/bin
exportPATH=${PATH}:${ANDROID_PRODUCT_OUT_BIN}:${ANDROID_PRODUCT_OUT};

最後,同步這些變化並啟動模擬器:

$source ~/.bashrc
$ cd~/Android/source/out/target/product/generic
$ emulator -systemsystem.img -data userdata.img -ramdisk ramdisk.img

載入上我們所編譯出來的系統檔案,終於出現了期待已久的模擬器:

ubuntu編譯Android出現的若干錯誤及解決方法

剛下好android原始碼後馬上編譯會發現有各種各樣的錯誤,原因是有些依賴包沒有裝。

為了避免出現以下我遇到的錯誤,請先安裝jdk1.5,必須是jdk1.5,不然肯定編譯不過的。

然後,在檢查以下有沒有安裝以下依賴包:

sudoapt-get install bison libc6-dev-amd64 g++-multilib zlib1g-devlib64z1-dev flex libncurses5-dev libx11-dev gperf

下面是我遇到的錯誤及解決方法:

/bin/bash:bison:找不到命令
Checkingbuild toolsversions...
************************************************************
Youare attempting to build with the incorrect version
of java.

Yourversion is: /bin/bash: java:找不到命令.
Thecorrect version is: 1.6.

Pleasefollow the machine setup instructions at

http://source.android.com/source/download.html

************************************************************
build/core/main.mk:114:*** stop
。停止。

解決方法:
sudoapt-get install bison

Install:out/host/linux-x86/framework/droiddoc.jar
target Generated:libclearsilver-jni <=out/host/common/obj/JAVA_LIBRARIES/clearsilver_intermediates/javalib.jar
hostC: libclearsilver-jni <=external/clearsilver/java-jni/j_neo_util.c
In file included from/usr/include/features.h:378,
from /usr/include/string.h:26,
fromexternal/clearsilver/java-jni/j_neo_util.c:1:
/usr/include/gnu/stubs.h:9:27:error: gnu/stubs-64.h:
沒有那個檔案或目錄
make:***[out/host/linux-x86/obj/SHARED_LIBRARIES/libclearsilver-jni_intermediates/j_neo_util.o]
錯誤1

解決方法:
sudoapt-get install libc6-dev-amd64

http://www.poemcode.net/2010/07/android-stubs-64/

hostSharedLib: libneo_util(out/host/linux-x86/obj/lib/libneo_util.so)
/usr/bin/ld: skippingincompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.so whensearching for -lstdc++
/usr/bin/ld: skipping incompatible/usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.a when searching for-lstdc++
/usr/bin/ld: skipping incompatible/usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.so when searching for-lstdc++
/usr/bin/ld: skipping incompatible/usr/lib/gcc/i486-linux-gnu/4.4.3/libstdc++.a when searching for-lstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: ldreturned 1 exit status
make: ***[out/host/linux-x86/obj/lib/libneo_util.so]
錯誤1

解決方法:
sudoapt-get install g++-multilib

external/clearsilver/cgi/cgi.c:22:18:error: zlib.h:沒有那個檔案或目錄
external/clearsilver/cgi/cgi.c:In function ‘cgi_compress’:
external/clearsilver/cgi/cgi.c:885:error: ‘z_stream’ undeclared (first use in thisfunction)
external/clearsilver/cgi/cgi.c:885: error: (Eachundeclared identifier is reported onlyonce
external/clearsilver/cgi/cgi.c:885: error: for each functionit appears in.)
external/clearsilver/cgi/cgi.c:885: error:expected ‘;’ before ‘stream’
external/clearsilver/cgi/cgi.c:888:error: ‘stream’ undeclared (first use in thisfunction)
external/clearsilver/cgi/cgi.c:888: error: ‘Bytef’undeclared (first use in thisfunction)
external/clearsilver/cgi/cgi.c:888: error: expectedexpression before ‘)’ token
external/clearsilver/cgi/cgi.c:889:error: ‘uInt’ undeclared (first use in thisfunction)
external/clearsilver/cgi/cgi.c:889: error: expected ‘;’before ‘str’
external/clearsilver/cgi/cgi.c:890: error:expected expression before ‘)’token
external/clearsilver/cgi/cgi.c:892: error: ‘uLong’undeclared (first use in thisfunction)
external/clearsilver/cgi/cgi.c:892: error: expected ‘)’before ‘stream’
external/clearsilver/cgi/cgi.c:895: error:‘alloc_func’ undeclared (first use in thisfunction)
external/clearsilver/cgi/cgi.c:895: error: expected ‘;’before numeric constant
external/clearsilver/cgi/cgi.c:896: error:‘free_func’ undeclared (first use in thisfunction)
external/clearsilver/cgi/cgi.c:896: error: expected ‘;’before numeric constant
external/clearsilver/cgi/cgi.c:897: error:‘voidpf’ undeclared (first use in thisfunction)
external/clearsilver/cgi/cgi.c:897: error: expected ‘;’before numeric constant
external/clearsilver/cgi/cgi.c:900: error:‘Z_DEFAULT_COMPRESSION’ undeclared (first use in thisfunction)
external/clearsilver/cgi/cgi.c:900: error: ‘Z_DEFLATED’undeclared (first use in thisfunction)
external/clearsilver/cgi/cgi.c:900: error: ‘MAX_WBITS’undeclared (first use in thisfunction)
external/clearsilver/cgi/cgi.c:900: error:‘Z_DEFAULT_STRATEGY’ undeclared (first use in thisfunction)
external/clearsilver/cgi/cgi.c:901: error: ‘Z_OK’undeclared (first use in thisfunction)
external/clearsilver/cgi/cgi.c:904: error: ‘Z_FINISH’undeclared (first use in thisfunction)
external/clearsilver/cgi/cgi.c:905: error:‘Z_STREAM_END’ undeclared (first use in thisfunction)
external/clearsilver/cgi/cgi.c: In function‘cgi_output’:
external/clearsilver/cgi/cgi.c:1200: error:‘Z_NULL’ undeclared (first use in thisfunction)
external/clearsilver/cgi/cgi.c:1201: error: expected ‘)’before ‘Bytef’
external/clearsilver/cgi/cgi.c:1201: warning:cast from pointer to integer of differentsize
external/clearsilver/cgi/cgi.c:1218: error: ‘Z_DEFLATED’undeclared (first use in this function)
make: ***[out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_cgi_intermediates/cgi.o]
錯誤1

解決方法:
sudoapt-get install zlib1g-dev

hostSharedLib: libneo_cgi(out/host/linux-x86/obj/lib/libneo_cgi.so)
/usr/bin/ld: skippingincompatible /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../libz.so whensearching for -lz
/usr/bin/ld: skipping incompatible/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../libz.a when searching for-lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.so whensearching for -lz
/usr/bin/ld: skipping incompatible/usr/lib/libz.a when searching for -lz
/usr/bin/ld: cannot find-lz
collect2: ld returned 1 exit status
make: ***[out/host/linux-x86/obj/lib/libneo_cgi.so]
錯誤1

解決方法:
sudoapt-get install lib64z1-dev

out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp:In function ‘intyyparse()’:
out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp:1827:warning: deprecated conversion from string constant to‘char*’
out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp:1970:warning: deprecated conversion from string constant to ‘char*’
Lex:aidl <= frameworks/base/tools/aidl/aidl_language_l.l
/bin/bash:flex
:找不到命令
make:***[out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp]
錯誤127

解決方法:
sudoapt-get install flex

Docsdroiddoc: out/target/common/docs/api-stubs
Could not load'clearsilver-jni'
java.library.path = out/host/linux-x86/lib
make:*** [out/target/common/docs/api-stubs-timestamp]
錯誤45

解決方法:安裝jdk1.5

hostExecutable: adb(out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb)
/usr/bin/ld:cannot find -lncurses
collect2: ld returned 1 exit status
make:*** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb]
錯誤1

解決方法:
sudoapt-get install libncurses5-dev

hostC: emulator <= external/qemu/android/main.c
In file includedfromexternal/qemu/android/main.c:30:
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:55:22:error: X11/Xlib.h:
沒有那個檔案或目錄
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:56:23:error: X11/Xatom.h:
沒有那個檔案或目錄
Infile included fromexternal/qemu/android/main.c:30:
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:73:error: expected specifier-qualifier-list before‘XEvent’
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:86:error: expected specifier-qualifier-list before‘Display’
external/qemu/android/main.c: In function‘main’:
external/qemu/android/main.c:1281: warning: implicitdeclaration of function ‘audio_check_backend_name’
make: ***[out/host/linux-x86/obj/EXECUTABLES/emulator_intermediates/android/main.o]
錯誤1

解決方法:
sudoapt-get install libx11-dev

GeneratingCSSPropertyNames.h <= CSSPropertyNames.in
sh: gperf: notfound
calling gperf failed: 32512 at ./makeprop.pl line 96.
make:***[out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h]
錯誤25
make:***
正在刪除檔案“out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h”

解決方法:
sudoapt-get install gperf



相關推薦

Android 編譯錯誤總結收集

收集和遇到的部分error,先記錄如下,改天按照建立android及使用情景分類整理。以後遇到的在慢慢新增進來 1.編譯錯誤: “/usr/bin/ld:cannotfind -lz” 解決方法: 需要安裝zlib-dev這個包,線上安裝命令為:apt-getinst

android 編譯錯誤總結--使用ButterKnife

1.Android Studio使用ButterKnife各種錯誤解決Plugin with id 'android-apt' not found.   ButterKnife可以幫助我們查詢控制元件,新增事件繫結等等,可以減少很多程式碼,但是在使用過程中對新手來說,往往會碰到很多

Android編譯過程總結android中各種img檔案的作用以及系統啟動過程

編譯環境:ubuntu 10.04(或者更高)(windows平臺目前不被支援) 本文以編譯android2.3為例,64位作業系統 1、編譯環境的準備  (1)確保安裝有ubuntu系統或者虛擬機器 (2)安裝JDK1.6(對於Android2.3以上程式碼) $ sud

Android編譯錯誤總結

檢視上方目錄或直接使用Ctrl+F直接搜尋你要查詢的問題部分關鍵字 直接使用Ctrl+F直接搜尋你要查詢的問題部分關鍵字或檢視上方目錄 如果有好的IDEA,期待與你的摩擦 Error:Execution failed f

Android 編譯錯誤——布局 Error parsing XML: not well-formed (invalid token)

XML width 文件 format source 註意 for 編碼 invalid 在修改了Android布局文件後,編譯出現Error parsing XML: not well-formed (invalid token)。 首先先排查xml文件的編碼格式是否

我的Android進階之旅------&gt;Android編譯錯誤java.util.zip.ZipException: duplicate entry的解決方法

image bsp failed 進階 技術分享 san col get cep 今天在Android Studio中把另外一個項目引入當前項目,編譯的時候出現了java.util.zip.ZipException: duplicate entry錯誤。 錯誤例如以下

Oracle 錯誤總結問題解決 ORA

建議使用CTRL + F精確搜尋   ORA-00001: 違反唯一約束條件 (.) 錯誤說明:當在唯一索引所對應的列上鍵入重複值時,會觸發此異常。 ORA-00017: 請求會話以設定跟蹤事件 ORA-00018: 超出最大會話數 ORA-00019: 超出最大會話許可數 ORA

Android編譯錯誤Execution failed for task ':app:transformNativeLibsWithStripDebugSymbolForDebug'

Android編譯時報的錯誤:     Execution failed for task ':app:transformNativeLibsWithStripDebugSymbolForDebug'

Android 年底面試總結未來兩年規劃

        面試是每個求職者永恆的話題,在這個資本寒冬的冬天,跳槽變得越來越謹慎了,但是,有時候為了一份自己滿意的工作還是要勇敢的跳出來。不管是因為和上級不和還是因為你要過圖輕鬆然後幡然悔悟,總之,打工者就是這麼回事。下面分享下年底面試的經歷。這個過程,真的不短,要準備

Android 編譯錯誤之: warning: "_FORTIFY_SOURCE" redefined

由於 android 在編譯的過程中,使用了Werror 的選項,那麼任何warning 都會當作錯誤來處理。 在編譯 android 4.0 (IceCreamSandwith) 的時候,由於使用的編譯器中可能內建了 _FORITY_SOUCE 這個巨集,在編譯 andr

FFmpeg/ffplay for VC 編譯錯誤總結

宣告:本文,部分來源於網路集合整理,另一部分來自於本人遇到的問題和解決方法; 編譯SDK 編譯之後,執行make install後,在C:/MSYS/local會生成bin、include、lib等資料夾。這樣ffmpeg的編譯環境就幫我生成了一個SDK,這個SDK在li

Oracle 錯誤總結解決方法

ORA-00001: 違反唯一約束條件 (.) 錯誤說明:當在唯一索引所對應的列上鍵入重複值時,會觸發此異常。 ORA-00017: 請求會話以設定跟蹤事件 ORA-00018: 超出最大會話數 ORA-00019: 超出最大會話許可數 ORA-00020: 超出最大程序數

IAR編譯錯誤總結

1)、IAR編譯出現:Error[Li005]: no definition for "UI_CreatePedometerWin" [referenced from E:\project\Holte

MTK Android 編譯模組說明編譯命令

alps/檔案目錄 [makeMtk]   ALPS project make /build entry point. [bionic]   C runtime libraries, such as, libc, libm, libdl, dynamic linker et

mina android程式設計錯誤總結

使用MINA編寫伺服器端和android客戶端軟體常常會遇到各種問題1.出現形如下的錯誤提示java.lang.NoClassDefFoundError: org.apache.mina.transport.socket.nio.NioSocketConnector這個問題常

C++ 莫名編譯錯誤總結

1 static 變數沒有在 cpp 中初始化2 c 檔案 在c++ 工程中沒有 用 #ifdef __cplusplusextern "C"{#endif #ifdef __cplusplusextern "C"}#endif3 忘了 #include <string

ubuntu11.10 64bit 環境android編譯錯誤

錯誤1: 注意:external/protobuf/java/src/main/java/com/google/protobuf/GeneratedMessageLite.java 使用了未經檢查或不安全的操作。 注意:要了解詳細資訊,請使用 -Xlint:unchecke

[Android]編譯錯誤:Could not get unknown property 'release' for SigningConfig container

在寫gradle指令碼時,出現:Could not get unknown property 'release' for SigningConfig container的錯誤。 出現這種錯誤的原因有:

c++經常遇到的編譯錯誤總結,以及vc++進行debug的方法

“object of abstract class type..is not allowed” 這樣的編譯錯誤經常出現在建立物件的時候,一般是因為該類的介面或者抽象類中有某個方法還沒有實現,或

Android ViewTreeObserver使用總結獲得View高度的幾種方法

ViewTreeObserver 註冊一個觀察者來監聽檢視樹,當檢視樹的佈局、檢視樹的焦點、檢視樹將要繪製、檢視樹滾動等發生改變時,ViewTreeObserver都會收到通知,ViewTreeObserver不能被例項化,可以呼叫View.getViewTre