編輯:Android開發實例
external/clearsilver/cgi/cgi.c:888: error: expected expression before ‘)’ token
external/clearsilver/cgi/cgi.c:889: error: ‘uInt’ undeclared (first use in this function)
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 this function)
external/clearsilver/cgi/cgi.c:892: error: expected ‘)’ before ‘stream’
external/clearsilver/cgi/cgi.c:895: error: ‘alloc_func’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:895: error: expected ‘;’ before numeric constant
external/clearsilver/cgi/cgi.c:896: error: ‘free_func’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:896: error: expected ‘;’ before numeric constant
external/clearsilver/cgi/cgi.c:897: error: ‘voidpf’ undeclared (first use in this function)
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 this function)
external/clearsilver/cgi/cgi.c:900: error: ‘Z_DEFLATED’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:900: error: ‘MAX_WBITS’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:900: error: ‘Z_DEFAULT_STRATEGY’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:901: error: ‘Z_OK’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:904: error: ‘Z_FINISH’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:905: error: ‘Z_STREAM_END’ undeclared (first use in this function) external/clearsilver/cgi/cgi.c: In function ‘cgi_output’:
external/clearsilver/cgi/cgi.c:1200: error: ‘Z_NULL’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:1201: error: expected ‘)’ before ‘Bytef’
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] Error 1
解決:[email protected]:~/work/android-2.1_r2$ sudo apt-get install zlib1g-dev
(5)/bin/bash: flex: command not found
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] Error 127
解決:[email protected]:~/work/android-2.1_r2$ sudo apt-get install flex
(6)/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1
解決:[email protected]:~/work/android-2.1_r2$ sudo apt-get install libncurses-dev
(7)prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:55:22: error: X11/Xlib.h: No such file or directory
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:56:23: error: X11/Xatom.h: No such file or directory
In file included from external/qemu/android/skin/window.c:19:
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’
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_intermediates/android/skin/window.o] Error 1
解決:[email protected]:~/work/android-2.1_r2$ sudo apt-get install libx11-dev
(8)sh: gperf: not found
calling gperf failed: 32512 at ./makeprop.pl line 96.
make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h] Error 25
make: *** Deleting file `out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h'
解決:[email protected]:~/work/android-2.1_r2$ sudo apt-get install gperf
http://hi.baidu.com/maxgoto/blog/item/fa000f7bf01135f80ad187d8.html 最近下載了Android 2.1源碼,在Ubuntu 9.10上做了一次編譯,由於系統為純淨系統,之前沒有進行過任何Android的編譯,所以需先安裝一些必要軟件。編譯過程參考網上一些文章,做下筆記如下,以供參考:
1. 下載或更新Android源碼 至最新,截止到前天(04-09)好像是2.1-r2.
2. Android 要求的 jdk 1.5,而Ubuntu9.10的源裡只有JDK1.6. 目前網上解決方法有兩種:
解決方法一: 安裝JDK1.5
1) 根據官方文檔裡所說,源代碼的編譯必須使用JDK5才能編譯的了,所以這裡我們使用jdk5
2) 需要先更新源,在終端裡執行 sudo vim /etc/apt/sources.list
3) 在source.list裡把以下2行拷貝到文檔最後面:
deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse
保存退出。
4) 執行 sudo apt-get update 更新源.
5)配置編譯環境並下載JDK5:sudo apt-get install sun-java5-jdk
3. 安裝編譯過程中必需軟件 。根據網上高人的經驗,這是編譯的最小工具軟件集。
$sudo apt-get install build-essential
$sudo apt-get install zlib1g-dev
$sudo apt-get install flex
$sudo apt-get install libncurses-dev
$sudo apt-get install libx11-dev
$sudo apt-get install gperf
4. make .經過漫長的編譯過程,編譯成功。
解決方法二: 安裝JDK 1.6 , 修改Android源文件。
Ubuntu9.10默認安裝的純淨系統,沒裝任何其他軟件。
1.下載源碼android-2.1_r2,直接make
2.出錯及解決如下:
(1)/bin/bash: bison: command not found
解決:[email protected]:~/work/android-2.1_r2$ sudo apt-get install bison
(2)make: *** No rule to make target `Please-install-JDK-5.0,-update-12-or-higher,-which-you-can-download-from-java.sun.com',
needed by `out/target/common/docs/api-stubs-timestamp'. Stop.
解決:安裝JDK 5.0
1):根據官方文檔裡所說,源代碼的編譯必須使用JDK5才能編譯的了,所以這裡我們使用jdk5
2): 需要先更新源,在終端裡執行 sudo vim /etc/apt/sources.list
3): 在source.list裡把以下2行拷貝到文檔最後面:
deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse
保存退出。
4): 執行 sudo apt-get update 更新源.
5): 配置編譯環境並下載JDK5:sudo apt-get install sun-java5-jdk
(3)/bin/bash: g++: command not found
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o] Error 127
解決:[email protected]:~/work/android-2.1_r2$ sudo apt-get install build-essential
(4)external/clearsilver/cgi/cgi.c:22:18: error: zlib.h: No such file or directory
external/clearsilver/cgi/cgi.c: In function ‘cgi_compress’:
external/clearsilver/cgi/cgi.c:885: error: ‘z_stream’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:885: error: (Each undeclared identifier is reported only once
external/clearsilver/cgi/cgi.c:885: error: for each function it appears in.)
external/clearsilver/cgi/cgi.c:885: error: expected ‘;’ before ‘stream’
external/clearsilver/cgi/cgi.c:888: error: ‘stream’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:888: error: ‘Bytef’ undeclared (first use in
this function)介紹 最近用淘寶客戶端的時候,編輯地址的時候有個地區選擇的功能。看上面的效果覺得挺酷,滾動的時候,是最後一個從下面飛上來挨著前一個。就自己鼓搗一個
例如,屏幕的上方或下方。要實現這種效果。就需要獲得對話框的Window對象,獲得這個Window對象有多種方法。最容易的就是直接通過AlertDialog類的ge
Android提供了許多方法來控制播放的音頻/視頻文件和流。其中該方法是通過一類稱為MediaPlayer。Android是提供MediaPlayer類訪問內置的媒體播放
Android應用程序可以在許多不同地區的許多設備上運行。為了使應用程序更具交互性,應用程序應該處理以適合應用程序將要使用的語言環境方面的文字,數字,文件等。在本章中,我