问题描述
我正在尝试在我的 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,是广告块库被删除了还是什么?
解决方法
替换
implementation 'org.adblockplus:adblock-android-webview:4.1'
到
implementation 'org.adblockplus:adblock-android-webview:4.3.0'