首页 > 其他分享 >Derect local .aar file dependencies are not supported when building an AAR

Derect local .aar file dependencies are not supported when building an AAR

时间:2024-07-03 17:53:05浏览次数:1  
标签:building supported when aarLib 文件夹 AAR file aar

背景

项目中需要将部分功能业务打包成aar包供其它项目调用,我引入了fataar(具体使用方式见github)。实际打包过程中抛出错误Derect local .aar file dependencies are not supported when building an AAR

原因分析

我们项目中lib文件夹下导入了很多jar包、aar包,在之前没有引入aar包时,打包是正常的。所以问题就出在使用aar包二次编译成aar,就会抛出该错误

解决

  1. 在工程下新建文件夹 aarLib(这个文件夹可自定义名称) 并在里新建build.gradle文件,文件内容如下:
    configurations.maybeCreate("default")
    artifacts.add("default", file('aar名称.aar'))
  2. 将本地 aar 放入这个新建的文件夹目录中
  3. 将新创建文件夹项目添加到settings.gradle文件中:
    include ':aarLib'
  4. 将新建项目包含导入到Lib库中
    implementation project(path: ':aarLib')
    PS:使用fataar如果需要将aarLib中的aar包打包进最终aar,应该使用替代写法
    embed project(path: ':aarLib')

标签:building,supported,when,aarLib,文件夹,AAR,file,aar
From: https://www.cnblogs.com/terrorists/p/18282295

相关文章

  • KSQLException: The authentication type 10 is not supported.
    Java应用使用人大金仓数据库启动时报错:Causedby:com.kingbase8.util.KSQLException:Theauthenticationtype10isnotsupported.Checkthatyouhaveconfiguredthesys_hba.conffiletoincludetheclient'sIPaddressorsubnet,andthatitisusinganauthenti......
  • 解决报错 cuDNN error: CUDNN_STATUS_NOT_SUPPORTED. This error may appear if you p
      训练模型出现报错cuDNNerror: CUDNN_STATUS_NOT_SUPPORTED.Thiserrormayappearifyoupassedinanon-contiguousinput.1.尝试了对可能的tensor添加.contiguous()函数,不能解决问题,排除。2.尝试将batch_size=12减小到10,不再报错,但实验要求不能减小batch_s......
  • Vue 打包 Error: error:0308010C:digital envelope routines::unsupported
    这个错误通常与Node.js的加密模块和OpenSSL版本有关出现这个错误是因为node.jsV17版本中最近发布的OpenSSL3.0,而OpenSSL3.0对允许算法和密钥大小增加了严格的限制,可能会对生态系统造成一些影响.js/app.8d066b51.jsfromTerserError:error:0308010C:digitalenveloperout......
  • mysql order by后跟case when
    在SQL中,ORDERBY子句用于对查询结果进行排序。当在ORDERBY后面使用CASE语句时,它的原理是:根据CASE语句中定义的条件和结果,为查询结果集中的每一行生成一个临时的排序值。然后,根据这些排序值对结果集进行排序。具体来说,CASE语句在ORDERBY中的工作原理如下:   条件判断:CASE......
  • Bug记录:Content-Type 'application/json;charset=UTF-8' is not supported异常解决
    Content-Type'application/json;charset=UTF-8'isnotsupported异常解决前提:确定不是因为Content-Type导致的异常,controller层有注解@RequestBody。报错详情:确定不是因为缺少Jackson依赖或者版本过低:注意到报错信息上边有一条警告日志:.c.j.MappingJackson2HttpMessageCo......
  • CF1316E Team Building
    CF1316ETeamBuilding状压dp观察:假如选出了\(p\)个队员,那么\(k\)个观众一定是剩下的人中的前\(k\)大。可以考虑将\(a_i\)从大到小排序,那么观众就是剩下的人中的一段前缀。然后就可以考虑怎么选队员了,发现\(p\)很小,考虑直接状压队员。设\(f_{i,s}\)表示考虑完前......
  • WPF grid column resize via GridSpitter, when you can drag to enlarge or shrink t
    <Windowx:Class="WpfApp137.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft......
  • 报错 urllib3 (1.26.7) or chardet (5.2.0)/charset_normalizer (2.0.8) doesn‘t mat
    报错RequestsDependencyWarning:urllib3(1.26.7)orchardet(5.2.0)/charset_normalizer(2.0.8)doesn'tmatchasupportedversion!warnings.warn("urllib3({})orchardet({})/charset_normalizer({})doesn'tmatchasupported"这个警告信息Req......
  • 【异常错误】RTX 4090 nvcc fatal : Unsupported gpu architecture ‘compute_89‘
    https://mapengsen.blog.csdn.net/article/details/137865369?spm=1001.2101.3001.6650.3&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EYuanLiJiHua%7EPosition-3-137865369-blog-123348901.235%5Ev43%5Epc_blog_bottom_relevance_base8&depth_1......
  • 【Java】 如何解决Java中的UnsupportedClassVersionError错误
    >>【痕迹】QQ+微信朋友圈和聊天记录分析工具>>(1)纯Python语言实现,使用Flask后端,本地分析,不上传个人数据。>>(2)内含QQ、微信聊天记录保存到本地的方法,真正实现自己数据自己管理。>>(3)数据可视化分析QQ、微信聊天记录,提取某一天的聊天记录与大模型对话。>>**下载......