android-studio - Android工作室:无法从gitlab找到包
问题描述
我正在尝试启动 owncloud android 库的 sample_client 应用程序。
你可以在这里找到图书馆:
我更改了 gradle 文件以获取软件包。我的问题如下:
任务 ':owncloudComLibrary:generateDebugRFile' 执行失败。
无法解析配置 ':owncloudComLibrary:debugCompileClasspath' 的所有文件。找不到 com.gitlab.ownclouders:dav4android:oc_support_2.1.5。要求:项目:owncloudComLibrary 找不到 com.github.AppDevNext.Logcat:LogcatCore:2.2.2。要求:项目:owncloudComLibrary
Simple_client 应用程序 build.gradle :
apply plugin: 'com.android.application'
buildscript{
repositories{
jcenter()
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies{
classpath 'com.android.tools.build:gradle:4.1.2'
}
}
repositories{
jcenter()
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
implementation project(':owncloudComLibrary')
}
android {
compileSdkVersion 30
defaultConfig {
minSdkVersion 21
targetSdkVersion 30
// This is pretty ugly but manifest placeholders don't seem to work very well when using different modules
// See https://github.com/openid/AppAuth-Android/issues/325
manifestPlaceholders = [appAuthRedirectScheme: '']
}
lintOptions {
abortOnError false
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
库 build.gradle :
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
buildscript {
ext {
kotlinVersion = "1.3.31"
}
repositories{
jcenter()
google()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
repositories {
mavenCentral()
google()
jcenter()
}
dependencies {
api 'com.squareup.okhttp3:okhttp:4.6.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.31"
api 'com.gitlab.ownclouders:dav4android:oc_support_2.1.5'
api 'com.github.AppDevNext.Logcat:LogcatCore:2.2.2'
// Moshi
implementation ("com.squareup.moshi:moshi-kotlin:1.11.0") {
exclude module: "kotlin-reflect"
}
kapt "com.squareup.moshi:moshi-kotlin-codegen:1.11.0"
testImplementation 'junit:junit:4.13.1'
}
android {
compileSdkVersion 29
defaultConfig {
minSdkVersion 21
targetSdkVersion 29
versionCode = 10000900
versionName = "1.0.9"
}
lintOptions {
abortOnError false
ignoreWarnings true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
谢谢您的帮助
解决方案
推荐阅读
- android - 带有边框和背景的 Button 可绘制
- html - 如何在交换内容时使用锚点?
- c# - 抛出 system.exception.stackoverflowexception C#
- angular - 扩展 PrimeNG 组件
- laravel - Laravel 5.6 - 数据库选择调用数组上的成员函数 join()
- cors - 带有 XHR.withCredentials 的 npm 请求?
- java - java对arraylists是否有相当于mysql的限制和偏移量?
- firebase - 带 Firebase 的节点 MCU(ESP 8266)
- html - HTML 表格是否仍然可行?
- protobuf-net - Protobuf 多对象序列化顺序?