ARouter icon indicating copy to clipboard operation
ARouter copied to clipboard

打包aab app获取不到其他模块的fragment apk是正常的

Open 874516119 opened this issue 3 years ago • 2 comments

你好: 我使用的版本: api 'com.alibaba:arouter-api:1.5.2' annotationProcessor 'com.alibaba:arouter-compiler:1.5.2' (app 模块 子模块都试过添加)

这是 aab 打包后 arouter 的日志 I/ARouter::: ARouter init success![ ] I/ARouter::: Thread production, name is [ARouter task pool No.1, thread No.1][ ] I/ARouter::: ARouter init over.[ ] W/ARouter::: ARouter::There is no route match the path [/score/books_library_fragment], in group [score][ ] I/ARouter::: ARouter openLog[ ] I/ARouter::: ARouter init start.[ ] I/ARouter::: Load router map by arouter-auto-register plugin.[ ] I/ARouter::: Load root element finished, cost 0 ms.[ ] I/ARouter::: ARouter init success![ ] I/ARouter::: Thread production, name is [ARouter task pool No.1, thread No.1][ ] I/ARouter::: ARouter init over.[ ]

这是 apk 打包后 arouter 的日志 D/ARouter::: LogisticsCenter has already been loaded, GroupIndex[2], InterceptorIndex[0], ProviderIndex[2][ ] I/ARouter::: ARouter init success![ ] D/ARouter::: The group [arouter] starts loading, trigger by [/arouter/service/interceptor][ ] D/ARouter::: The group [arouter] has already been loaded, trigger by [/arouter/service/interceptor][ ] I/ARouter::: Thread production, name is [ARouter task pool No.1, thread No.1][ ] I/ARouter::: ARouter init over.[ ] D/ARouter::: The group [score] starts loading, trigger by [/score/books_library_fragment][ ] D/ARouter::: The group [score] has already been loaded, trigger by [/score/books_library_fragment][ ] I/ARouter::: ARouter openLog[ ] I/ARouter::: ARouter init start.[ ] I/ARouter::: Load router map by arouter-auto-register plugin.[ ] I/ARouter::: Load root element finished, cost 0 ms.[ ] D/ARouter::: LogisticsCenter has already been loaded, GroupIndex[2], InterceptorIndex[0], ProviderIndex[2][ ] I/ARouter::: ARouter init success![ ] D/ARouter::: The group [arouter] starts loading, trigger by [/arouter/service/interceptor][ ] D/ARouter::: The group [arouter] has already been loaded, trigger by [/arouter/service/interceptor][ ] I/ARouter::: Thread production, name is [ARouter task pool No.1, thread No.1][ ] I/ARouter::: ARouter init over.[ ]

“/score/books_library_fragment ” 是我当前 需要获取 字模块的 fragment 他在 app 模块aab 包返回 null, apk 包 返回了

重日志上看 LogisticsCenter 没有创建 但是 我有找不到为什么。

874516119 avatar Mar 15 '22 10:03 874516119

aab会移除无用的资源,不知道和这个特性是否有关。 请问一下下面第三方库都是哪些版本?我这边编译都过不了。

distributionUrl=https://services.gradle.org/distributions/gradle-7.2-all.zip

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10" classpath 'com.android.tools.build:gradle:7.1.2' classpath 'com.google.gms:google-services:4.3.10' classpath "com.alibaba:arouter-register:1.0.2"

api 'com.alibaba:arouter-api:1.5.2' kapt "com.alibaba:arouter-compiler:1.5.2"

异常:

`` Configuration cache state could not be cached: input property '$3' of ':app:transformClassesWithCom.alibaba.arouterForDebug': error writing value of type 'org.gradle.api.internal.file.FilteredFileTree'

Querying the mapped value of provider(interface java.util.Set) before task ':app:compileDebugKotlin' has completed is not supported

  • Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Exception is: org.gradle.configurationcache.ConfigurationCacheError: Configuration cache state could not be cached: input property '$3' of ':app:transformClassesWithCom.alibaba.arouterForDebug': error writing value of type 'org.gradle.api.internal.file.FilteredFileTree'

``

scsfwgy avatar Mar 15 '22 11:03 scsfwgy

aab会移除无用的资源,不知道和这个特性是否有关。 请问一下下面第三方库都是哪些版本?我这边编译都过不了。

distributionUrl=https://services.gradle.org/distributions/gradle-7.2-all.zip

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10" classpath 'com.android.tools.build:gradle:7.1.2' classpath 'com.google.gms:google-services:4.3.10' classpath "com.alibaba:arouter-register:1.0.2"

api 'com.alibaba:arouter-api:1.5.2' kapt "com.alibaba:arouter-compiler:1.5.2"

异常:

`` Configuration cache state could not be cached: input property '$3' of ':app:transformClassesWithCom.alibaba.arouterForDebug': error writing value of type 'org.gradle.api.internal.file.FilteredFileTree'

Querying the mapped value of provider(interface java.util.Set) before task ':app:compileDebugKotlin' has completed is not supported

  • Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  • Exception is: org.gradle.configurationcache.ConfigurationCacheError: Configuration cache state could not be cached: input property '$3' of ':app:transformClassesWithCom.alibaba.arouterForDebug': error writing value of type 'org.gradle.api.internal.file.FilteredFileTree'

`` gradle:6.1 别的 都是一样的

874516119 avatar Mar 16 '22 03:03 874516119