Android 通过gradle(非jcenter)从bintray解析工件
我已经将工件部署到bintray,正如文档中所示(使用他们的插件)。一切看起来都很好。它在布劳德打开,结构看起来很好: 现在,我想在发布到jcenter()之前通过Android Studio中的gradle使用它。我看过他们的文件 我试过:Android 通过gradle(非jcenter)从bintray解析工件,android,maven,gradle,aar,bintray,Android,Maven,Gradle,Aar,Bintray,我已经将工件部署到bintray,正如文档中所示(使用他们的插件)。一切看起来都很好。它在布劳德打开,结构看起来很好: 现在,我想在发布到jcenter()之前通过Android Studio中的gradle使用它。我看过他们的文件 我试过: buildscript { repositories { jcenter() maven { url "https://dl.bintray.com/flymob/maven"
buildscript {
repositories {
jcenter()
maven {
url "https://dl.bintray.com/flymob/maven"
}
}
}
及
或
我得到一个错误:
未能解析:flymob sdk示例:FlyMobSdk:1.3.0
我做错了什么?您添加了“https://dl.bintray.com/flymob/maven“
在buildscript
部分中。这些是仅由buildscript(也称为gradle脚本)使用的回购协议。这些是系统将从apply plugin
修复它很容易。只需将其移动到脚本“根”上的存储库
。比如:
buildscript {
repositories {
// repos for the build script
jcenter()
... etc
}
dependencies {
// dependencies from the plugins from the build script
classpath 'com.android.tools.build:gradle:2.1.2'
... etc
}
}
apply plugin: 'android-sdk-manager'
apply plugin: ... etc
repositories {
jcenter()
maven { url "https://dl.bintray.com/flymob/maven" } <<<<< HERE
}
dependencies {
compile ... etc
buildscript{
存储库{
//构建脚本的repos
jcenter()
等
}
依赖关系{
//来自构建脚本插件的依赖项
classpath'com.android.tools.build:gradle:2.1.2'
等
}
}
应用插件:“android sdk管理器”
应用插件:。。。等
存储库{
jcenter()
maven{url“https://dl.bintray.com/flymob/maven“}您添加了”https://dl.bintray.com/flymob/maven“
在构建脚本
部分内。这些是构建脚本(也称为gradle脚本)仅使用的repo。这些是系统将从应用插件
中查找插件的repo”
修复它很容易。只需将它移动到脚本“根”上的存储库中即可。类似于:
buildscript {
repositories {
// repos for the build script
jcenter()
... etc
}
dependencies {
// dependencies from the plugins from the build script
classpath 'com.android.tools.build:gradle:2.1.2'
... etc
}
}
apply plugin: 'android-sdk-manager'
apply plugin: ... etc
repositories {
jcenter()
maven { url "https://dl.bintray.com/flymob/maven" } <<<<< HERE
}
dependencies {
compile ... etc
buildscript{
存储库{
//构建脚本的repos
jcenter()
等
}
依赖关系{
//来自构建脚本插件的依赖项
classpath'com.android.tools.build:gradle:2.1.2'
等
}
}
应用插件:“android sdk管理器”
应用插件:…等等
存储库{
jcenter()
maven{url“https://dl.bintray.com/flymob/maven" }
buildscript {
repositories {
// repos for the build script
jcenter()
... etc
}
dependencies {
// dependencies from the plugins from the build script
classpath 'com.android.tools.build:gradle:2.1.2'
... etc
}
}
apply plugin: 'android-sdk-manager'
apply plugin: ... etc
repositories {
jcenter()
maven { url "https://dl.bintray.com/flymob/maven" } <<<<< HERE
}
dependencies {
compile ... etc