Comments (17)
方案已经有了,周末应该会更新。
from fat-aar-android.
现在有两个解决办法:
- module依赖appcompatV7的方式改为compileOnly.
- 在主module中加上implementation 相同版本的appcompatV7
from fat-aar-android.
你试试是否可以解决
from fat-aar-android.
我试了下 在我的要打包的module模块中 使用了api依赖了 V7 发现还是不行,难道要换成compileOnly?
from fat-aar-android.
�在主module中使用api或者implementation support之后,clean再编一次
from fat-aar-android.
OK 我晚会试试 谢谢你的及时回复
from fat-aar-android.
dependencies { embed (name:'dy-account-common-0.0.2.4',ext:'aar') compileOnly (name:'dy-account-common-0.0.2.4',ext:'aar') embed (name:'dy-aweme-open-sdk-0.0.1.1',ext:'aar') compileOnly (name:'dy-aweme-open-sdk-0.0.1.1',ext:'aar') embed (name:'dy-opensdk-oversea-0.0.2.7',ext:'aar') compileOnly (name:'dy-opensdk-oversea-0.0.2.7',ext:'aar') api 'com.android.support:appcompat-v7:28.0.0' api 'com.google.code.gson:gson:2.8.5' }
警告: [options] 未与 -source 1.7 一起设置引导类路径 /Users/zhoupengfei/StudioProjects/LightGamUnity/TestMergeAArDemo/mylibrary/build/intermediates/exploded-aar/release/r/com/bytedance/sdk/account/open/aweme/R.java:290: 错: 找不到符号 public static final int abc_config_showMenuShortcutsWhenKeyboardPresent = com.ss.union.mylibrary.R.bool.abc_config_showMenuShortcutsWhenKeyboardPresent; ^ 符号: 变量 abc_config_showMenuShortcutsWhenKeyboardPresent 位置: 类 bool /Users/zhoupengfei/StudioProjects/LightGamUnity/TestMergeAArDemo/mylibrary/build/intermediates/exploded-aar/release/r/com/bytedance/sdk/account/open/aweme/R.java:335: 错: 找不到符号 public static final int error_color_material = com.ss.union.mylibrary.R.color.error_color_material; ^ 符号: 变量 error_color_material 位置: 类 color /Users/zhoupengfei/StudioProjects/LightGamUnity/TestMergeAArDemo/mylibrary/build/intermediates/exploded-aar/release/r/com/bytedance/sdk/account/open/aweme/R.java:391: 错: 找不到符号 public static final int abc_action_bar_progress_bar_size = com.ss.union.mylibrary.R.dimen.abc_action_bar_progress_bar_size; ^ 符号: 变量 abc_action_bar_progress_bar_size 位置: 类 dimen 3 个错误
` dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.kezong:fat-aar:1.1.11'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}`
是不是跟我依赖的aar里面 他们对 support的依赖是implement形式的有关 是不是需要他们以compileOnly的形式依赖?
from fat-aar-android.
嗯,是的。 目前的版本是这样的,aar对support的依赖需要改成compileOnly,这样就不会生成对应的R.txt。
我现在也在优化这一块,预计下一个版本能够能解决该问题。
from fat-aar-android.
够能解决该问
👍
from fat-aar-android.
你的意思是说 如果原来是 api或者implement形式的 那么主module进行融合打包的时候 会生成对应的support的R.java,也就是 appcompat的资源ID ,这样就会导致融合后,appcompat的资源也被打进了我们的融合aar中,并且引用的包名也变成了我们的,所以会出现上面的错误 com.ss.union.mylibrary.R.bool.abc_config_showMenuShortcutsWhenKeyboardPresent 但是其实这个资源文件是V7包中的 ,是这样理解吗
from fat-aar-android.
不完全是这样,真正资源并不会融合至aar。
如果api或者implement形式引入appcompat包,�会在R.txt中声明appcompat包中的资源id, 但是实际资源并不会打入aar中。
但是fat-aar插件中合并R文件时会根据R.txt中的id来做资源映射,生成R.java,而这时候找不到appcompat的实际资源,所以就会出错。
from fat-aar-android.
咱们下个版本大概什么时候更新呢?
from fat-aar-android.
现在就是融合那些aar里面的R.txt文件中包含不属于自己的属性的时候就会出错
from fat-aar-android.
试一下1.2.0版本
from fat-aar-android.
from fat-aar-android.
我试了试120的版本 目前打包是没问题的,我在测试测试看打出来的包 使用过程中会不会有问题 。哦 对了,这个如果是基于融合的包 再次融合 ,会不会出现什么问题呢?
from fat-aar-android.
不会有问题
from fat-aar-android.
Related Issues (20)
- 1.3.8的fat-aar版本,AGP 7.3 Gradle7.4,资源文件没merge到一起,class什么的都merge到一起了。 HOT 11
- Duplicated *.so resources HOT 5
- packagingOptions的配置对这个插件生效吗
- resources not included on AGP 7.3.0 HOT 2
- Build fat AAR file from flutter module
- Binding Resouces (.BR) not created for sub lib,
- java.lang.NoSuchFieldError: No static field ic_rapido_splash of type I in class Lcom/rapido/passenger/R$drawable; or its superclasses
- Could not resolve all dependencies for configuration ':dsrrdlibrary:embed HOT 1
- Android Resource linking failed
- Support for Gradle 8+, AGP 8+ HOT 3
- 如何过滤abi,打出来的最终AAR包含了x86,armeabi,armeabi-v7a,arm64-v8a所有的so,不想要这么多,abiFilters不生效
- Failed to apply plugin [id 'com.kezong.fat-aar'] HOT 2
- java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/lifecycle/runtime/R$id; HOT 1
- 完全不生效
- Task with name 'transformClassesWithTransformRForFataarDebug' not found in project HOT 2
- 一种安全的替换 fat-aar-android 插件的方法 HOT 8
- Is there a package relocation for the embed dependencies?
- 请问下如何配置Gradle 8.0版本 HOT 1
- How to exlcude "org.jetbrains.kotlin:kotlin-stdlib" HOT 2
- Cannot Merge SmartRefreshLayout 打包Module无法合并SmartRefreshLayout
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fat-aar-android.