Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译Release包在混淆过程中产生了的太多的AGPBI提醒,直到GC overhead limit exceeded崩溃了,打包失败 #32

Open
yinyangwu opened this issue Nov 17, 2022 · 0 comments

Comments

@yinyangwu
Copy link

Android target SDK 是Android13:

=============================================================================

#Android SDK依赖
TARGET_SDK_VERSION=33
MIN_SDK_VERSION=21
COMPILE_SDK_VERSION=33
KOTLIN_COROUTINES_VERSION=1.6.1

=============================================================================

gradle tools的版本:

=============================================================================

classpath 'com.android.tools.build:gradle:7.3.1'
classpath "com.github.jokar:multi-languages.plugin:0.1.5"

=============================================================================

gradle.properties文件中的部分内容:

=============================================================================

#gradle提速相关
org.gradle.daemon=true
org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=2048m -XX:MaxMetaspaceSize=2048m -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -Dfile.encoding=UTF-8
org.gradle.parallel=true
org.gradle.caching=true
#优化kotlin
kotlin.incremental=true
kotlin.incremental.java=true
kotlin.incremental.js=true
kotlin.caching.enabled=true
kotlin.code.style=official
#优化kapt
kapt.incremental.apt=true
kapt.include.compile.classpath=false
#android项目提速相关
android.databinding.incremental=true
android.injected.testOnly=false
android.useAndroidX=true
android.enableJetifier=true
android.enableBuildScriptClasspathCheck=false
android.suppressUnsupportedCompileSdk=33

=============================================================================

执行assembleOfficialRelease命令,编译过程中的部分日志:

=============================================================================

AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/853.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/853.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/853.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/853.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/853.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow. In later version of R8, the method may be assumed not reachable.","sources":[{"file":"/Users/yinyangwu/AndroidStudioProjects/miya/app/build/intermediates/transforms/MultiLanguages/official/release/651.jar"}],"tool":"R8"}
File system event consumer thread stopped due to exception
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:130)
at java.base/sun.nio.fs.UnixPath.(UnixPath.java:69)
at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279)
at java.base/java.nio.file.Path.of(Path.java:147)
at java.base/java.nio.file.Paths.get(Paths.java:69)
at org.gradle.internal.watch.registry.impl.DefaultFileWatcherRegistry$1.handleChangeEvent(DefaultFileWatcherRegistry.java:89)
at net.rubygrapefruit.platform.internal.jni.AbstractFileEventFunctions$ChangeEvent.handleEvent(AbstractFileEventFunctions.java:266)
at org.gradle.internal.watch.registry.impl.DefaultFileWatcherRegistry.lambda$createAndStartEventConsumerThread$0(DefaultFileWatcherRegistry.java:84)
at org.gradle.internal.watch.registry.impl.DefaultFileWatcherRegistry$$Lambda$153/0x0000000800355c40.run(Unknown Source)
at java.base/java.lang.Thread.run(Thread.java:829)
Exception in thread "Daemon client event forwarder" java.lang.OutOfMemoryError: GC overhead limit exceeded
Problem in daemon expiration check
java.lang.OutOfMemoryError: GC overhead limit exceeded

Task :app:minifyOfficialReleaseWithR8
AGPBI: {"kind":"error","text":"java.lang.OutOfMemoryError: GC overhead limit exceeded","sources":[{}],"tool":"R8"}
java.lang.OutOfMemoryError: GC overhead limit exceeded

Task :app:minifyOfficialReleaseWithR8 FAILED

=============================================================================

初步怀疑是multi-languages插件中当前的ASM写法存在大量的内存泄露问题,导致了内存OOM了,麻烦大佬抽时间能看看吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant