How to build intermediate classes.jar in android N
来源:互联网 发布:seo入门 编辑:程序博客网 时间:2024/06/16 13:22
in Android M, you can achieve that by using LOCAL_JACK_ENABLED = disabled variable in your makefile.
commit 32bd0adf9c5dcd1560d77bdb886c7acc78496657[log] [tgz]author Paul Duffin <paulduffin@google.com>Thu Sep 15 14:34:42 2016 +0100committer Paul Duffin <paulduffin@google.com>Mon Sep 19 13:38:51 2016 +0100tree 3b33f201ab2661384e386cdee70166172de4b508parent 2fcacb5a226b17cd26f61a3ee3becebe3f4eacab [diff]
In Android N it is more tricky...it is broken and the solution to this is yet to come in AOSP mainline of Android N.
Solution is available in master.
Checked in 7.1.1 Android N.
You need to make use of javac-check target. This has been implemented for this purpose.
make javac-check-$(LOCAL_MODULE)
So, if your module name is "ABCD"
make javac-check-ABCD
This generates a classes-full-debug.jar, in the common\obj\JAVA_LIBRARIES\ABCD_intermediates.
This is the jar which you can use in your Studio environment.
Most important, this solution is not yet visible in any of the tags on Android N branch. It is part of the master hence you need to add this solution to your branch manually.
https://android.googlesource.com/platform/build/+/32bd0adf9c5dcd1560d77bdb886c7acc78496657
Add targets for building individual modules using javacThis is needed in order to be able to run error prone (which isa plugin replacement for javac) on a subset of the java code.Bug: 31507496Test: Build javac-check-core-tests and check the resulting JARChange-Id: I5a556920572fcdad7b39d67e3f00fe0e0f1f8f46
diff --git a/core/host_java_library.mk b/core/host_java_library.mkindex 0a7dd8a..cc26d7c 100644--- a/core/host_java_library.mk+++ b/core/host_java_library.mk
@@ -73,6 +73,7 @@ $(transform-host-java-to-package) javac-check : $(full_classes_compiled_jar)+javac-check-$(LOCAL_MODULE) : $(full_classes_compiled_jar) # Run jarjar if necessary, otherwise just copy the file. ifneq ($(strip $(LOCAL_JARJAR_RULES)),)
diff --git a/core/java.mk b/core/java.mkindex e505ffb..606b474 100644--- a/core/java.mk+++ b/core/java.mk
@@ -416,6 +416,7 @@ $(transform-java-to-classes.jar) javac-check : $(full_classes_compiled_jar)+javac-check-$(LOCAL_MODULE) : $(full_classes_compiled_jar) # Run jarjar if necessary, otherwise just copy the file. ifneq ($(strip $(LOCAL_JARJAR_RULES)),)
阅读全文
0 0
- How to build intermediate classes.jar in android N
- How to build android
- How to use Classes in QTP
- How to: subversion build number in your Android app
- How to generate links to the android Classes' reference in javadoc?
- How to build libDTS in the MSYS?
- How to build libA52 in the MSY?
- How to build giflib in the MSYS?
- How to build libpng in the MSYS?
- How to generate monkeyrunner build-in help?
- How to call c++ exported method and classes in c#
- 第九天(How to Use Classes in Sencha Touch)
- classes.jar setting build path
- How to access files in a jar?
- How to Build and Run Android L 64-bit ARM in QEMU
- how to check in code to ooo-build
- how to set android build type
- How to build Android Windows SDK
- 雷军:全面屏新零售微信都是我先提的,为什么你们只记住了苹果马云张小龙?
- 搜索引擎技术之倒排索引
- 程序员别再默默付出了,是时候提涨薪的事了
- android jni jbyteArray转char*
- ANDROID样式的开发:SHAPE篇
- How to build intermediate classes.jar in android N
- DAY3
- 搜索引擎技术之网络爬虫
- Android_二维码
- bzoj 2565: 最长双回文串 manacher
- 搜索引擎分类和基础架构概述
- BZOJ4520 CQOI2016 K远点对 KD树 小根堆维护距离
- python实现队列
- Python列表对象实现原理