栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

error: failed linking references.

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

error: failed linking references.

前言

今天在写demo的时候,引用了一个库,我自己的studio是sdk25,而引用的库的版本是sdk28,studio3.3的,版本较高,于是出现“error: failed linking references.”

解决办法

这里我首先将我app_module对应的

compileSdkVersion 25

修改为

compileSdkVersion 28

,然后下面引用的

 implementation  'com.android.support:appcompat-v7:25.3.1'

报错,按提示修改为

implementation  'com.android.support:appcompat-v7:28.0.0'

运行提示:

Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 19 declared in library [com.github.ShaoqiangPei:DemoUtil:1.0.1] C:Userspei.gradlecachestransforms-1files-1.1DemoUtil-1.0.1.aar4a17a0a126acdb405884346818052524AndroidManifest.xml as the library might be using APIs not available in 15
    Suggestion: use a compatible library with a minSdk of at most 15,        or increase this project's minSdk version to at least 19,        or use tools:overrideLibrary="com.lib" to force usage (may lead to runtime failures)

ok,按提示将 app_module中的 minSdkVersion 15 改为 minSdkVersion 19,编译,运行,就可以了。

看来,低的sdk配置的项目在引用高sdk配置的第三方库,还是存在兼容问题啊。



作者:奔跑的佩恩
链接:https://www.jianshu.com/p/cc46d9c197c2


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/237986.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号