qq_29993263
qq_29993263
2017-11-07 02:32

关于android用aar的问题,求各路大佬帮忙

  • android

我用AS写了一个app,想放到android系统源码里面以前编译,app里用到一些aar,但是我怎么都试不出正确的方法可以在android.mk文件里添加进去。求各路大佬支支招~~~

平台是:a31s
android版本是:4.4
下面是我的Android.mk:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_JAVA_AAR_LIBRARIES := appcompat-v7-26

LOCAL_SRC_FILES := $(call all-subdir-java-files)

LOCAL_SDK_VERSION := current

LOCAL_PACKAGE_NAME := SensorGeter

include $(BUILD_PACKAGE)
##################################################
include $(CLEAR_VARS)

LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := appcompat-v7-26:libs/appcompat-v7-26.0.0-alpha1.aar

LOCAL_AAPT_FLAG := \
--auto-add-overlay \
--extra-package android.support.v7.app

include $(BUILD_MULTI_PREBUILT)

Use the folloing include to make our test apk.

include $(call all-makefiles-under,$(LOCAL_PATH))

编译一直都出错:软件包 android.support.v7.app 不存在

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答