編輯:關於Android編程
在系統源碼中添加一個APK源碼目錄,並寫了相應的android.mk文件,編譯時出錯如下:
make: *** No rule to make target `out/target/common/obj/JAVA_LIBRARIES/liba71S_intermediates/javalib.jar', needed by `out/target/common/obj/APPS/My_Settings_intermediates/classes-full-debug.jar'. Stop.
make: *** Waiting for unfinished jobs....
按之前的經驗,嘗試了幾種方法,發現都沒有解決,後來定位到android.mk文件寫的有問題
修改前:
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_JAVA_LIBRARIES := bouncycastle telephony-common
LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 testinterface
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := My_Settings
LOCAL_CERTIFICATE := platform
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES :android-support-v4:libs/android-support-v4.jar testinterface:libs/testinterface.jar
include $(BUILD_PACKAGE)
# Use the folloing include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))
上述編譯會出錯,
修改後,編譯oK
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_JAVA_LIBRARIES := bouncycastle telephony-common
LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 testinterface
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := My_Settings
LOCAL_CERTIFICATE := platform
include $(BUILD_PACKAGE)
include $(CLEAR_VARS)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES :android-support-v4:libs/android-support-v4.jar testinterface:libs/testinterface.jar
include $(BUILD_MULTI_PREBUILT)
# Use the folloing include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))
其他說明:
1.要使用mm命令單獨編譯某個模塊或者應用,首先需要在JB目錄下全部編譯一次。
如果斷開編譯服務器(如關機後第二天再次需要單獨編譯)後,想再次單獨編譯,只需要配置項目環境,當然前提是你之前編譯過一次,並且沒有clean過。配置項目編譯環境命令:1. source build/envsetup.sh 2. lunch project_number
2.如果你的模塊或者應用的android.mk裡面配置LOCAL_MODULE_TAGS := optional ,則需要把LOCAL_PACKAGE_NAME 對應的名字添加到系統的PRODUCT_PACKAGES +=中,如PRODUCT_PACKAGES +=My_Setting \
3.其他具體編譯錯誤,再根據具體的log信息處理
安卓驗證碼的簡單實現我們經常在登錄或者注冊的時候要求輸入驗證碼,這裡簡單介紹一下一種方法 效果如下首先是要獲取 隨機的四個字母組合,我這裡是將26個字母存儲到一個數組中,
Touch事件分發中只有兩個主角:ViewGroup和View。Activity的Touch事件事實上是調用它內部的ViewGroup的Touch事件,可以直接當成Vie
前言1、什麼是NDK?NDK全稱是Native Development Kit,NDK提供了一系列的工具,幫助開發者快速開發C(或C++)的動態庫,並能自動將so和jav
大家都知道,現在安裝Android系統的手機版本和設備千差萬別,在模擬器上運行良好的程序安裝到某款手機上說不定就出現崩潰的現象,開發者個人不可能購買所有設備逐個調試,所以