android-support-v13编译错误解决

今天在RTK平台需要用android原生的setting去验证一个问题,所以在RTK平台编译android 原生setting时遇见编译错误。

首先,报错package android.support.v13.app does not exist
import android.support.v13.app.FragmentPagerAdapter;

很明显package android.support.v13包没有添加依赖,在android.mk中添加静态依赖LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 android-support-v13 jsr305然后,编译后又报错make: *** No rule to make target `out/target/common/obj/JAVA_LIBRARIES/android-support-v13_intermediates/javalib.jar', needed by `out/target/common/obj/APPS/Settings_intermediates/classes-full-debug.jar'.  Stop.

缺少中间文件,根据以往经验这种就是要在android.mk中添加预编译,添加如下include $(CLEAR_VARS)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
      android-support-v13:libs/android-support-v13.jar
include $(BUILD_MULTI_PREBUILT)


然后再编译就可以顺利编译。

你可能感兴趣的:(android-support-v13编译错误解决)