微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

找不到 org.adblockplus:adblock-android-webview:4.1

如何解决找不到 org.adblockplus:adblock-android-webview:4.1

我正在尝试在我的 android 项目中使用 AdblockWebView。我正在使用 adblockplus webview,因此我将依赖项添加到我的应用程序 build.gradle

https://github.com/adblockplus/libadblockplus-android

dependencies {
    implementation 'org.adblockplus:adblock-android-webview:4.1'

    ...
}

但是当我构建项目时出现以下错误,并且当我尝试使用 org.adblockplus.libadblockplus.android.webview.AdblockWebView Android Studio 可以找到该类时。

Execution Failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find org.adblockplus:adblock-android-webview:4.1.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/adblockplus/adblock-android-webview/4.1/adblock-android-webview-4.1.pom
       - https://jcenter.bintray.com/org/adblockplus/adblock-android-webview/4.1/adblock-android-webview-4.1.pom
     required by:
         project :app

Possible solution:
 - Declare repository providing the artifact,see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html


我打开了 jcenter url,它说 404 not found,是广告块库被删除了还是什么?

https://repo.jfrog.org/artifactory/libs-release-bintray/org/adblockplus/adblock-android-webview/4.1/adblock-android-webview-4.1.pom?referrer

解决方法

替换

implementation 'org.adblockplus:adblock-android-webview:4.1'

implementation 'org.adblockplus:adblock-android-webview:4.3.0'

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。