android studio 项目在Ubuntu源码环境下编译生成的apk无法安装

android studio 项目在Ubuntu源码环境下编译生成的apk无法安装;

我将Android.mk文件放在app/src/mian文件夹中,与AndroidManifest,xml同级目录。(不知是否有错?)

以下是mm命令后显示的:
find: src': No such file or directory
make: Entering directory
/home/.../android4.0'
Install: out/target/product/generic/system/app/sjmangerhsot.apk
make: *** No rule to make target packages/apps/SJHost/app/src/main/libs/sjinstruction.jar', needed byout/target/product/generic/obj/JAVA_LIBRARIES/sjinstruction_intermediates/javalib.jar'. Stop.
make: Leaving directory `/home/.../android4.0'

生成的out/target/product/generic/system/app/下的apk无法安装;
make: *** No rule to make target packages/apps/SJHost/app/src/main/libs/sjinstruction.jar', needed byout/target/product/generic/obj/JAVA_LIBRARIES/sjinstruction_intermediates/javalib.jar'. Stop.这个问题是为什么,在JAVA_LIBRARIES这个目录下没找到生成的sjinstruction_intermediates/javalib.jar',是因为sjinstruction.jar包有问题吗?

以上是Android.mk文件:
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_STATIC_JAVA_LIBRARIES := sjinstruction jackson-mapper
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME :=sjmangerhsot
LOCAL_CERTIFICATE := platform
WITH_DEXPREOPT := false
LOCAL_JNI_SHARED_LIBRARIES :=libopenh264 \
libpjsua2 \
libyuv
include $(BUILD_PACKAGE)
include $(CLEAR_VARS)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := sjinstruction:libs/sjinstruction.jar \
jackson-mapper:libs/ksoap2-android-assembly-3.3.0-jar-with-dependencies.jar
include $(BUILD_MULTI_PREBUILT)
include $(call all-makefiles-under,$(LOCAL_PATH))

一共导入了sjinstruction.jar和ksoap2-android-assembly-3.3.0-jar-with-dependencies.jar这个俩个jar包,libopenh264 、libpjsua2 和libyuv这三个so文件。

总之,就是mm命令后生成的apk文件无法安装,mm命令后报了错误:make: *** No rule to make target packages/apps/SJHost/app/src/main/libs/sjinstruction.jar', needed byout/target/product/generic/obj/JAVA_LIBRARIES/sjinstruction_intermediates/javalib.jar'. Stop.
是Android.mk的问题还是sjinstruction.jar包的问题? 先谢谢各位大神了。
2015-09-18 10:42 添加评论 分享
已邀请:

最佳回复

0

yuqile - 我是乐工

赞同来自:

起作用的是你项目中的build.xml这个文件
0

yuqile - 我是乐工

赞同来自:

mm 用的ANT编译的不会使用 gradle的依赖语句

要回复问题请先登录注册

退出全屏模式 全屏模式 回复