我想在我的项目中添加一个库。
这是我的build.gradle
文件:
apply plugin: 'com.android.application'
repositories {
mavenCentral()
maven {
credentials {
username "XXXXX"
password "XXXXX"
}
url "https://developers.interpay.se/nexus/content/repositories/Interpay/"
}
}
android {
compileSdkVersion 25
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "interpay.XXX.XXX.com.interpay"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
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.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'se.interpay:terminal:0.7.7'
}
但是我收到了这个错误:
Error:(38, 13) Failed to resolve: se.interpay:terminal:0.7.7
<a href="openFile:D:/XXXX/XXXX/Interpay/app/build.gradle">Show in File</a><br>
<a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
答案 0 :(得分:0)
最后我找到了答案.. 我必须更新android studio才能在托管网站上使用新的maven版本