studio项目放源码环境编译

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_25815655/article/details/80069623

源码开发经常需要把eclipse项目(虽然已经不使用此工具开发app了)或studio项目放到源码里面,下面写下自己的经验以备查阅

1,studio项目,需要保留的文件,如下图:mk文件自己写的


2,mk文件

# Copyright 2007-2008 The Android Open Source Project

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := $(call all-java-files-under, app/src/main/java)
LOCAL_MANIFEST_FILE := app/src/main/AndroidManifest.xml
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/app/src/main/res

    


LOCAL_PACKAGE_NAME := DMCompaus

LOCAL_CERTIFICATE := platform

include $(BUILD_PACKAGE)



# This finds and builds the test apk as well, so a single make does both.
include $(call all-makefiles-under,$(LOCAL_PATH))
 

其中  LOCAL_SRC_FILES:表示代码的位置

        LOCAL_MANIFEST_FILE:AndroidManifest.xml路径

        LOCAL_RESOURCE_DIR:res资源路径

-------------------------------------------------------------------------------------------------------------------------------

下面是eclipse项目


2,mk文件

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_PACKAGE_NAME := FlashLight

LOCAL_CERTIFICATE := platform

include $(BUILD_PACKAGE)

# This finds and builds the test apk as well, so a single make does both.
include $(call all-makefiles-under,$(LOCAL_PATH))

LOCAL_PACKAGE_NAME := FlashLight这个名字是编译进系统时,device.mk写的名字


下面是另一篇文章,各种mk写法:https://blog.csdn.net/qq_25815655/article/details/80069344

阅读更多
换一批

没有更多推荐了,返回首页