打包aab app获取不到其他模块的fragment apk是正常的
你好: 我使用的版本: 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 没有创建 但是 我有找不到为什么。
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'
``
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 别的 都是一样的