报错内容如下:
make: *** 没有规则可以创建“out/target/common/obj/APPS/
AndroidWFS_intermediates/classes-full-debug.jar”
需要的目标“out/target/common/obj/JAVA_LIBRARIES/
core_intermediates/classes.jar”。 停止。
解决方案:
- 将项目复制到packages/apps目录下
- 新建Android.mk文件
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_JAVA_LIBRARIES := commons-httpclient-3.0.1 commons-io-2.1 core tools acra
LOCAL_PACKAGE_NAME := AndroidWFS
LOCAL_CERTIFICATE := platform
LOCAL_DEX_PREOPT := false#这行加上后只生成独立apk,为true时生成一个odex和一个apk
include $(BUILD_PACKAGE)
include $(call all-makefiles-under,$(LOCAL_PATH))
commons-httpclient-3.0.1 commons-io-2.1 core tools acra#这些是别名,随便取,下面的jarname会用到的
- 创建目录out/target/common/obj/JAVA_LIBRARIES/jarname_intermediates
- 将jar包复制到上面的目录,重命名为classes.jar
- 在源码根目录执行
. build/envsetup.sh
lunch aosp_arm-eng
cd packages/apps/applicationdir(项目目录)
mm
- 坐等apk
版权声明:本文为博主原创文章,未经博主允许不得转载。
时间: 2024-11-12 02:29:28