clipboard(1).png

点击show details,提示如下:


Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.github.licheedev.SomeLibrary:myutils:0.02.

Could not resolve com.github.licheedev.SomeLibrary:myutils:0.02.

Required by:

project :app

> Could not resolve com.github.licheedev.SomeLibrary:myutils:0.02.

> Could not get resource 'https://jitpack.io/com/github/licheedev/SomeLibrary/myutils/0.02/myutils-0.02.pom'.

> Could not GET 'https://jitpack.io/com/github/licheedev/SomeLibrary/myutils/0.02/myutils-0.02.pom'. Received status code 401 from server: Unauthorized


android studio3.0.1下一个项目,原先好好的,能build,最近换了一台电脑,结果就开始报错了。浏览器访问https://jitpack.io/com/github/licheedev/SomeLibrary/myutils/0.02/myutils-0.02.pom,提示“No read access to repo”,该开始还一直以为是移动宽带不好,访问不了这些github这些外国网站,然后就加载不了这些包,后来发现根本不是的。


解决方案:

PhoXo2.png

通过我们强大的度娘,最后感觉还是csdn比较牛掰,然后找到了答案,在app/build.gradle中找到“implementation 'com.github.licheedev.SomeLibrary:myutils:0.02' ”并注释掉

新的一行添加 implementation 'com.licheedev:logplus:1.0.0',因为原作者已经修改了这个库,或者说是弃用了这个库,原作者弃用之后在github或者jitpack上都找不到相关页面,也没有替换的方法,所以困扰了很久。然后重新build下,这里如果之前没有引用过第三方包或者库还会报错


Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar]

Configuration on demand is an incubating feature.

Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.

:app:preBuild UP-TO-DATE

:app:preDebugBuild

:app:compileDebugAidl UP-TO-DATE

:app:compileDebugRenderscript UP-TO-DATE

:app:checkDebugManifest UP-TO-DATE

:app:generateDebugBuildConfig UP-TO-DATE

:app:greendaoPrepare UP-TO-DATE

:app:greendao UP-TO-DATE

:app:prepareLintJar UP-TO-DATE

:app:generateDebugResValues UP-TO-DATE

:app:generateDebugResources UP-TO-DATE

:app:mergeDebugResources UP-TO-DATE

:app:createDebugCompatibleScreenManifests UP-TO-DATE

:app:processDebugManifest

G:\wwwroot\zhejiangmiliangnianmiji-shouyin20200706\app\src\main\AndroidManifest.xml:17:5-75 Warning:

Element uses-permission#android.permission.READ_PHONE_STATE at AndroidManifest.xml:17:5-75 duplicated with element declared at AndroidManifest.xml:6:5-75

G:\wwwroot\zhejiangmiliangnianmiji-shouyin20200706\app\src\main\AndroidManifest.xml:22:18-91 Error:

Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91

is also present at [androidx.core:core:1.3.1] AndroidManifest.xml:24:18-86 value=(androidx.core.app.CoreComponentFactory).

Suggestion: add 'tools:replace="android:appComponentFactory"' to

See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.

:app:processDebugManifest FAILED

FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':app:processDebugManifest'.

> Manifest merger failed with multiple errors, see logs

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 6s

12 actionable tasks: 2 executed, 10 up-to-date



这个解决方法也简单,他都有提示了,找到app/src/main/AndroidManifest.xml在<application下添加代码

<application

 tools:replace="android:appComponentFactory"

   android:appComponentFactory="任意字符"


然后在build,这样应该就没啥问题了,然后在找到offline work这样gradle sync速度就快了,不过你要是有新的库或者包加进来你就需要关闭这个offline work了,灵活运用吧。

本文链接:http://www.20m8.com/148.html

热门文章

android studio Gradle Build Running特别慢解决方案

查看全文 hehu158 于 2021-03-06 13:04 发表在 APP ( 阅读:4006 )

Could not resolve com.github.licheedev.SomeLibrary:myutils:0.02解决方案

Could not resolve com.github.licheedev.SomeLibrary:myutils:0.02.其实就是原作者弃用了这个库包。

查看全文 hehu158 于 2021-06-17 09:47 发表在 APP ( 阅读:3356 )

android studio 4.2.1 新装提示Failed to load JVM DLL

android studio4.2.1报错不要慌,管理员权限开启试试,特别是新装的windows10系统

查看全文 hehu158 于 2021-06-03 12:33 发表在 APP ( 阅读:2522 )

Hbuilder APP开发修改

查看全文 hehu158 于 2018-11-06 13:55 发表在 APP ( 阅读:2318 )

Could not determine java version from '11.0.8'.

针对我们的老项目,不建议升级ide,今天升级了下Android studio,结果就报错了Could not determine java version from '11.0.8'.不用怕搞不定我们直接把Android studio降级就行了哈。

查看全文 hehu158 于 2021-06-05 15:41 发表在 APP ( 阅读:2111 )

Android平板原生APP对接扫码枪丢首位数字

Android平板链接扫码枪,扫码枪扫码老是丢首位数字,后来发现是谷歌输入法的问题

查看全文 hehu158 于 2020-07-24 09:47 发表在 APP ( 阅读:2110 )

Android原生开发单线程解决方案

Android原生开发单线程解决方案,解决不了我们就换个思路,通过接口来保证单线程,先想后写才是一个程序员大佬的正确打开方式哈。

查看全文 hehu158 于 2020-10-16 10:45 发表在 APP ( 阅读:1884 )

AJ-Captcha for UNI-APP VUE3 VITE实例

为大家分享一款开源又免费的行为验证码

查看全文 hehu158 于 2023-01-03 13:57 发表在 APP ( 阅读:1174 )