Android 开发问题:Could not find com.github.barteksc:android-pdf-viewer:3.2.0-beta.1.

发布时间:2026/7/9 21:10:56
Android 开发问题:Could not find com.github.barteksc:android-pdf-viewer:3.2.0-beta.1. implementationcom.github.barteksc:android-pdf-viewer:3.2.0-beta.1在 Android 开发中引入 AndroidPDFViewer 库出现如下错误信息Execution failed for task :view:mergeDebugNativeLibs. Could not resolve all files for configuration :view:debugRuntimeClasspath. Could not find com.github.barteksc:android-pdf-viewer:3.2.0-beta.1. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/github/barteksc/android-pdf-viewer/3.2.0-beta.1/android-pdf-viewer-3.2.0-beta.1.pom - https://repo.maven.apache.org/maven2/com/github/barteksc/android-pdf-viewer/3.2.0-beta.1/android-pdf-viewer-3.2.0-beta.1.pom问题原因这个错误表示 Gradle 在默认的仓库中找不到 AndroidPDFViewer 库即 Google Maven 和 Maven Central一开始的处理方式是增加 JitPack 仓库但是在后续的开发中发现增加这个仓库也无法解决问题 Could not resolve all files for configuration :view:debugRuntimeClasspath. Could not find com.github.barteksc:android-pdf-viewer:3.2.0-beta.1. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/github/barteksc/android-pdf-viewer/3.2.0-beta.1/android-pdf-viewer-3.2.0-beta.1.pom - https://repo.maven.apache.org/maven2/com/github/barteksc/android-pdf-viewer/3.2.0-beta.1/android-pdf-viewer-3.2.0-beta.1.pom - https://jitpack.io/com/github/barteksc/android-pdf-viewer/3.2.0-beta.1/android-pdf-viewer-3.2.0-beta.1.pom后来发现需要增加 Liferay 仓库才能解决问题Liferay 是开源的企业级门户平台其官方提供了自己的 Maven 仓库处理策略在 settings.gradle 文件中添加如下内容增加 JitPack 仓库和 Liferay 仓库dependencyResolutionManagement{...repositories{...maven{urlhttps://jitpack.io}maven{urlhttps://repository.liferay.com/nexus/content/repositories/public/}}}补充学习Liferay 是一个企业级开源门户平台和数字体验平台门户平台简单来说就是把多个内部系统集成在一个页面上例如邮件、HR、CRM、文档库等例如登录公司内网首页有 1. 左边待办审批来自 OA 系统 2. 中间公司新闻来自 CMS 3. 右边邮件提醒来自 Exchange不再满足于把系统堆在一起而是希望提供流畅、智能的数字体验于是门户平台升级为数字体验平台Digital Experience Platform简称 DXP简单来说数字体验平台 升级版的门户平台 现代化扩展