任何人都可以在此向我解释什么是git的版本标签,导入此文件时出现错误。
apply plugin: 'com.android.application'
buildscript {
repositories {
maven { url 'https:example.com' }
jcenter()
mavenCentral()
mavenLocal()
}
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.example.jatinder.bdugame"
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'org.bitbucket.5elements:SmartTones-SDK:VERSION_TAG'
}
错误:
Error:(45, 13) Failed to resolve: org.bitbucket.5elements:SmartTones-SDK:VERSION_TAG
<a href="openFile:/Users/rishabhjain/Desktop/IBM/BDUGame 2/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
最佳答案
您怀疑与Git或Maven有什么关系?
除了来自Android项目之外,它甚至与Android没有任何关系。
您声明了编译时间相关性org.bitbucket.5elements:SmartTones-SDK:VERSION_TAG
,这意味着组org.bitbucket.5elements
, Artifact SmartTones-SDK
,版本VERSION_TAG
。在您声明的任何存储库中都找不到此组合,因此无法解决,就像错误告诉您的那样。
关于gradle - 如何在Android的Gradle中添加存储库和依赖项。实际上是在尝试将SDk集成到我现有的应用中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41838015/