trouble writing output: Too many methods: 65641; max is 65536. By package:
来源:互联网 发布:云计算技术发展趋势 编辑:程序博客网 时间:2024/05/06 19:24
https://github.com/CyanogenMod/android_frameworks_base/commit/854f6f736b90d33b59b5a85bcecf72a416c43b7d
framework: Split off some packages to a new file
frameworks.jar is now hitting the maximum number of member classes(65535), resulting in the build failing with... trouble writing output: Too many methods: 65641; max is 65536. By package: 26 android 145 android.accessibilityservice 700 android.accounts 436 android.animation 8 android.annotation 3787 android.appAs a workaround, split off some packages to a new jar.This will probably need reviewing, the wiggle room left by movingthese packages is only about 1100 members
./framework/base/Android.mk
@@ -28,10 +28,25 @@ framework_res_source_path := APPS/framework-res_intermediates/src # the library # ============================================================+#+# These will be included in framework2 to avoid issues with the limit+# on the number of classes/dex+SECONDARY_FRAMEWORKS_SUBDIRS := \+ core/java/android/test \+ core/java/android/gesture \+ core/java/android/speech/srec \+ media/java/android/media/videoeditor \+ media/java/android/media/audiofx \+ media/mca/effect/java/android/media/effect \+ media/mca/effect/java/android/media/effect/effects+ include $(CLEAR_VARS) # FRAMEWORKS_BASE_SUBDIRS comes from build/core/pathmap.mk LOCAL_SRC_FILES := $(call find-other-java-files,$(FRAMEWORKS_BASE_SUBDIRS))+SECONDARY_SRC_FILES := $(call find-other-java-files,$(SECONDARY_FRAMEWORKS_SUBDIRS))++LOCAL_SRC_FILES := $(filter-out $(SECONDARY_SRC_FILES),$(LOCAL_SRC_FILES)) # EventLogTags files. LOCAL_SRC_FILES += \@@ -252,6 +267,7 @@ $(full_classes_compiled_jar): $(framework_res_R_stamp) $(LOCAL_INSTALLED_MODULE): | $(dir $(LOCAL_INSTALLED_MODULE))framework-res.apk framework_built := $(call java-lib-deps,framework)+framework_built += $(call java-lib-deps,framework2) # AIDL files to be preprocessed and included in the SDK, # relative to the root of the build tree.@@ -390,6 +406,7 @@ framework_docs_LOCAL_JAVA_LIBRARIES := \ core \ ext \ framework \+ framework2 \ framework_docs_LOCAL_MODULE_CLASS := JAVA_LIBRARIES framework_docs_LOCAL_DROIDDOC_HTML_DIR := docs/html@@ -664,7 +681,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES) LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) framework+LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) framework framework2 LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS) LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH) LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)@@ -717,6 +734,26 @@ LOCAL_DX_FLAGS := --core-library include $(BUILD_JAVA_LIBRARY) +include $(CLEAR_VARS)++# FRAMEWORKS_BASE_SUBDIRS comes from build/core/pathmap.mk+LOCAL_SRC_FILES := $(call find-other-java-files,$(SECONDARY_FRAMEWORKS_SUBDIRS))++LOCAL_NO_STANDARD_LIBRARIES := true+LOCAL_JAVA_LIBRARIES := bouncycastle core core-junit ext framework++LOCAL_MODULE_TAGS := optional+LOCAL_MODULE := framework2+LOCAL_MODULE_CLASS := JAVA_LIBRARIES++LOCAL_NO_EMMA_INSTRUMENT := true+LOCAL_NO_EMMA_COMPILE := true++#LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt++LOCAL_DX_FLAGS := --core-library++include $(BUILD_JAVA_LIBRARY) # Include subdirectory makefiles # ============================================================@@ -726,3 +763,4 @@ include $(BUILD_JAVA_LIBRARY) ifeq (,$(ONE_SHOT_MAKEFILE)) include $(call first-makefiles-under,$(LOCAL_PATH)) endif+
test-runner/Android.mk:
@@ -20,7 +20,7 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_JAVA_LIBRARIES := core core-junit framework
+LOCAL_JAVA_LIBRARIES := core core-junit framework framework2
LOCAL_MODULE:= android.test.runner
- trouble writing output: Too many methods: 65641; max is 65536. By package:
- 关于trouble writing output: Too many methods: xxxxx; max is 65536. By package:
- android framework.jar 分包应对trouble writing output: Too many methods: 66641; max is 65536. By package:
- 编译错误trouble writing output: Too many methods: 65544; max is 65536.
- 【exception】Too many methods: 65641; max is 65536. By package:
- trouble writing output: Too many method references: 90356; max is 65536. You may try using --multi-d
- Dx trouble writing output: already prepared 解决办法
- zookeeper NIOServerCnxn: Too many connections from /10.202.50.79 - max is 60 异常解决办法
- stackoverflow : Why C++ output is too much slower than C?
- stackoverflow : Why C++ output is too much slower than C?
- Caused by: java.net.SocketException: Too many open files
- mnesia is overloaded 及too many db tables问题总结
- Writing code is writing
- 使用Matlab的surf函数画地形时出现too many output arguments
- Trouble is a friend
- trouble is friend
- Trouble is a friend
- trouble is a friend
- 项目中常用的动画集锦(一直更新中……)
- 智能手机网页制作12个注意事项
- 八字易经算法之用JAVA实现排大运
- MMORPG 游戏服务器端设计
- xml方式---spring的AOP拦截用户操作
- trouble writing output: Too many methods: 65641; max is 65536. By package:
- ASP连接SQL2005数据库连接代码
- __attribute__的一些小用法
- 找出Java进程中大量消耗CPU
- C++编程思想读书笔记之 第五章 函数重载及缺省参数
- java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI(xxx
- MATLAB中的卷积运算
- MySQL 5.6 MEMCACHED API 体验
- 分享下多年积累的对JAVA程序员成长之路的总结