解析失败:com.github.barteksc:android-pdf-viewer:2.8.1
Failed to resolve: com.github.barteksc:android-pdf-viewer:2.8.1
我正在尝试在我的项目中使用这个库。但是我无法通过将其添加到 gradle 构建中来下载它。事实上,我什至无法通过 gradle 下载任何库。我需要手动下载一个 jar 文件并将其添加为库。但是在这种情况下,我找不到 PDFviewer 的 jar 文件。
Build.gradle(模块)
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:design:23.0.1'
testCompile 'junit:junit:4.12'
compile files('libs/jsoup-1.8.1.jar')
compile files('libs/log4j-1.2.9.jar')
compile files('libs/picasso-2.5.2.jar')
compile files('libs/json-simple-1.1.jar')
compile files('libs/glide-3.7.0.jar')
compile files('libs/commons-codec-1.9.jar')
compile files('libs/asmack.jar')
compile files('libs/android-logging-log4j-1.0.3.jar')
compile 'com.github.barteksc:android-pdf-viewer:2.8.1' //unable to add this.
}
Build.gradle
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
// google()
// mavenLocal() // tried everything
}
}
在过去的三天里,我几乎尝试了 SO 中给出的所有方法,但仍然找不到任何解决方案。即使我得到 jar 文件也会有帮助。
您应该添加
repositories
{
maven { url "http://jcenter.bintray.com" }
}
添加 Maven URL 和 GitHub 依赖项...
您可以打开互联网连接 Gradle 以下载必要的依赖项...
确保将它添加到 android\build.gradle 文件中的 allprojects 存储库中:不要忘记它应该使用 https://
进行 SSL 保护
repositories
{
maven {
url ("https://jcenter.bintray.com")
}
}
他掉线的时候是jCenter(已弃用)的问题。
添加:
allprojects {repositories {
mavenCentral()
google()
gradlePluginPortal()
}
}
只需将此行添加到 build.gradle(应用级别)
implementation 'com.github.barteksc:android-pdf-viewer:2.8.2'
如果您有 android studio bumblebee 或 android studio arctic fox 那么,
将gradlePluginPortal()添加到settings.gradle文件
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
只需将此行添加到 build.gradle(应用级别)
实施'com.github.barteksc:android-pdf-viewer:2.8.2'
如果你有 android studio bumblebee 或 android studio arctic fox 那么,
将 gradlePluginPortal() 添加到 settings.gradle 文件
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
同时添加
android.enableJetifier=true in gradle.properties
我正在尝试在我的项目中使用这个库。但是我无法通过将其添加到 gradle 构建中来下载它。事实上,我什至无法通过 gradle 下载任何库。我需要手动下载一个 jar 文件并将其添加为库。但是在这种情况下,我找不到 PDFviewer 的 jar 文件。
Build.gradle(模块)
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:design:23.0.1'
testCompile 'junit:junit:4.12'
compile files('libs/jsoup-1.8.1.jar')
compile files('libs/log4j-1.2.9.jar')
compile files('libs/picasso-2.5.2.jar')
compile files('libs/json-simple-1.1.jar')
compile files('libs/glide-3.7.0.jar')
compile files('libs/commons-codec-1.9.jar')
compile files('libs/asmack.jar')
compile files('libs/android-logging-log4j-1.0.3.jar')
compile 'com.github.barteksc:android-pdf-viewer:2.8.1' //unable to add this.
}
Build.gradle
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
// google()
// mavenLocal() // tried everything
}
}
在过去的三天里,我几乎尝试了 SO 中给出的所有方法,但仍然找不到任何解决方案。即使我得到 jar 文件也会有帮助。
您应该添加
repositories
{
maven { url "http://jcenter.bintray.com" }
}
添加 Maven URL 和 GitHub 依赖项...
您可以打开互联网连接 Gradle 以下载必要的依赖项...
确保将它添加到 android\build.gradle 文件中的 allprojects 存储库中:不要忘记它应该使用 https://
进行 SSL 保护repositories
{
maven {
url ("https://jcenter.bintray.com")
}
}
他掉线的时候是jCenter(已弃用)的问题。
添加:
allprojects {repositories {
mavenCentral()
google()
gradlePluginPortal()
}
}
只需将此行添加到 build.gradle(应用级别)
implementation 'com.github.barteksc:android-pdf-viewer:2.8.2'
如果您有 android studio bumblebee 或 android studio arctic fox 那么,
将gradlePluginPortal()添加到settings.gradle文件
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
只需将此行添加到 build.gradle(应用级别)
实施'com.github.barteksc:android-pdf-viewer:2.8.2'
如果你有 android studio bumblebee 或 android studio arctic fox 那么,
将 gradlePluginPortal() 添加到 settings.gradle 文件
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
同时添加
android.enableJetifier=true in gradle.properties