NativeActivity的示例:错误未知主机“jcenter.bintray.com”用实验的Gradle插件 [英] NativeActivity Sample : Error Unknown host 'jcenter.bintray.com' by using gradle experimental plugin
问题描述
我想从Android Studio中1.5.1样品建设NativeActivity的code,但我得到这个错误:
错误:未知主机jcenter.bintray.com。您可能需要在摇篮调整代理设置。
启用摇篮离线模式和同步
了解在摇篮&LT配置HTTP代理; / A>
我没有不使用插件实验的 (com.android.tools.build:gradle-experimental:0.4.0')
从android的git的枢纽使用的所有原生样本。
我的项目:NativeActivity的的build.gradle
//顶级构建文件,您可以添加常用的配置选项,所有分项目/模块。
buildscript {
库{
jcenter()
}
依赖{
类路径'com.android.tools.build:gradle-experimental:0.4.0
}
}allprojects {
库{
jcenter()
}
}
F你是无法打开这个路径
<一个href=\"https://bintray.com/android/android-tools/com.android.tools.build.gradle-experimental/0.4.0/view#files/com/android/tools/build/gradle-experimental\" rel=\"nofollow\">https://bintray.com/android/android-tools/com.android.tools.build.gradle-experimental/0.4.0/view#files/com/android/tools/build/gradle-experimental.
块引用>使用代理重试。
运行像自由门代理
在CMD类型的根路径项目
gradlew -Dhttps.proxyHost = 127.0.0.1 -Dhttps.proxyPort = 8580
I tried building the nativeActivity code from the samples in Android Studio 1.5.1 but I am getting this error :
Error:Unknown host 'jcenter.bintray.com'. You may need to adjust the proxy settings in Gradle. Enable Gradle 'offline mode' and sync Learn about configuring HTTP proxies in Gradle</a>
I didn't find this issue with the projects not using Experimental Plugin
(com.android.tools.build:gradle-experimental:0.4.0')
as used by all the Native samples from the android git hub.my Project:NativeActivity build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle-experimental:0.4.0' } } allprojects { repositories { jcenter() } }
解决方案f you're unable to open this path
Using proxy try again.
run a proxy like freegate
the root path project in cmd type
gradlew -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=8580
这篇关于NativeActivity的示例:错误未知主机“jcenter.bintray.com”用实验的Gradle插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!