Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/215.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
android中库Gradle的自定义存储库_Android_Maven_Gradle - Fatal编程技术网

android中库Gradle的自定义存储库

android中库Gradle的自定义存储库,android,maven,gradle,Android,Maven,Gradle,我正在创建Android library模块,其中我需要包含一个依赖项,该依赖项需要身份验证,因此其用户名和密码无法与sdk用户共享。当我在我的library build.gradle中设置自定义url时,它不会查找存储库。 当我将自定义存储库url放在项目级渐变中时,它可以工作,但不能工作。 代码示例: 图书馆毕业生: apply plugin: 'com.android.library' repositories { maven { url "https://cus

我正在创建Android library模块,其中我需要包含一个依赖项,该依赖项需要身份验证,因此其用户名和密码无法与sdk用户共享。当我在我的library build.gradle中设置自定义url时,它不会查找存储库。 当我将自定义存储库url放在项目级渐变中时,它可以工作,但不能工作。 代码示例:

图书馆毕业生:

apply plugin: 'com.android.library'

repositories {
    maven {
        url "https://custom.bintray.com"
    }
    maven {
        url "http://custom.bintray.com"
        credentials {
            username 'asfsafasf'
            password 'asdasfsf'
        }
    }
}
dependencies{
    implementation <gradle path of library present in above custom repo>
}
apply插件:“com.android.library”
存储库{
马文{
url“https://custom.bintray.com"
}
马文{
url“http://custom.bintray.com"
证书{
用户名'asfsafasf'
密码“asdasfsf”
}
}
}
依赖关系{
实施
}

当我在项目中使用我的库gradle时,它无法解析存储库

您是否尝试了中的答案?它没有我的问题。我不想将自定义的repo url共享给我的sdk用户