Coder Social home page Coder Social logo

Comments (17)

kezong avatar kezong commented on May 24, 2024 1

方案已经有了,周末应该会更新。

from fat-aar-android.

kezong avatar kezong commented on May 24, 2024

现在有两个解决办法:

  1. module依赖appcompatV7的方式改为compileOnly.
  2. 在主module中加上implementation 相同版本的appcompatV7

from fat-aar-android.

kezong avatar kezong commented on May 24, 2024

你试试是否可以解决

from fat-aar-android.

wodezhuanshu avatar wodezhuanshu commented on May 24, 2024

我试了下 在我的要打包的module模块中 使用了api依赖了 V7 发现还是不行,难道要换成compileOnly?

from fat-aar-android.

kezong avatar kezong commented on May 24, 2024

�在主module中使用api或者implementation support之后,clean再编一次

from fat-aar-android.

wodezhuanshu avatar wodezhuanshu commented on May 24, 2024

OK 我晚会试试 谢谢你的及时回复

from fat-aar-android.

wodezhuanshu avatar wodezhuanshu commented on May 24, 2024

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.

kezong avatar kezong commented on May 24, 2024

嗯,是的。 目前的版本是这样的,aar对support的依赖需要改成compileOnly,这样就不会生成对应的R.txt。

我现在也在优化这一块,预计下一个版本能够能解决该问题。

from fat-aar-android.

wodezhuanshu avatar wodezhuanshu commented on May 24, 2024

够能解决该问

👍

from fat-aar-android.

wodezhuanshu avatar wodezhuanshu commented on May 24, 2024

你的意思是说 如果原来是 api或者implement形式的 那么主module进行融合打包的时候 会生成对应的support的R.java,也就是 appcompat的资源ID ,这样就会导致融合后,appcompat的资源也被打进了我们的融合aar中,并且引用的包名也变成了我们的,所以会出现上面的错误 com.ss.union.mylibrary.R.bool.abc_config_showMenuShortcutsWhenKeyboardPresent 但是其实这个资源文件是V7包中的 ,是这样理解吗

from fat-aar-android.

kezong avatar kezong commented on May 24, 2024

不完全是这样,真正资源并不会融合至aar。
如果api或者implement形式引入appcompat包,�会在R.txt中声明appcompat包中的资源id, 但是实际资源并不会打入aar中。
但是fat-aar插件中合并R文件时会根据R.txt中的id来做资源映射,生成R.java,而这时候找不到appcompat的实际资源,所以就会出错。

from fat-aar-android.

wodezhuanshu avatar wodezhuanshu commented on May 24, 2024

咱们下个版本大概什么时候更新呢?

from fat-aar-android.

wodezhuanshu avatar wodezhuanshu commented on May 24, 2024

现在就是融合那些aar里面的R.txt文件中包含不属于自己的属性的时候就会出错

from fat-aar-android.

kezong avatar kezong commented on May 24, 2024

试一下1.2.0版本

from fat-aar-android.

wodezhuanshu avatar wodezhuanshu commented on May 24, 2024

from fat-aar-android.

wodezhuanshu avatar wodezhuanshu commented on May 24, 2024

我试了试120的版本 目前打包是没问题的,我在测试测试看打出来的包 使用过程中会不会有问题 。哦 对了,这个如果是基于融合的包 再次融合 ,会不会出现什么问题呢?

from fat-aar-android.

kezong avatar kezong commented on May 24, 2024

不会有问题

from fat-aar-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.