didi / DRouter

Android Router Framework
Apache License 2.0
735 stars 94 forks source link

升级jdk11后 编译失败 #30

Closed ztaober closed 2 years ago

ztaober commented 2 years ago

关闭R8编译 android.enableR8=false 启用代码混淆 minifyEnabled true jdk11(jdk8无问题) 示例Demo能复现该问题 windows系统

Execution failed for task ':demo:minifyDebugWithProguard'.

java.io.IOException: Can't read [C:\Users\troy\Repo\github\DRouter-master\demo\build\intermediates\transforms\DRouter\debug\44(;;;;;;;**.class)] (Can't read [com] (Can't read [didi] (Can't read [drouter] (Can't read [loader] (Can't read [host] (Can't read [InterceptorLoader.class] (Can't process class [com/didi/drouter/loader/host/InterceptorLoader.class] (Unsupported version number [55.0] (maximum 54.0, Java 10)))))))))

image

ztaober commented 2 years ago

Android Studio Bumblebee | 2021.1.1 Patch 2 Build #AI-211.7628.21.2111.8193401, built on February 17, 2022 Runtime version: 11.0.11+9-b60-7590822 amd64 VM: OpenJDK 64-Bit Server VM by Oracle Corporation Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 4096M Cores: 8 Registry: external.system.auto.import.disabled=true, ide.instant.shutdown=false Non-Bundled Plugins: org.jetbrains.kotlin (211-1.6.10-release-923-AS7442.40)

weigao123 commented 2 years ago

gradle.properties

android.enableR8 = false org.gradle.java.home = /Library/Java/JavaVirtualMachines/jdk1.8.0_321.jdk/Contents/Home

参考 https://weiku.co/article/642/