NativeActivity Sample : Error Unknown host 'jcenter.bintray.com' by using gradle experimental plugin

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()
    }
}

Answers


f you're unable to open this path

https://bintray.com/android/android-tools/com.android.tools.build.gradle-experimental/0.4.0/view#files/com/android/tools/build/gradle-experimental.

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


Need Your Help

How to create a panel that animates in and only leaves if it isn't triggered after a set time?

.net wpf animation wpf-animation

I have a simple Border element in my view with a child TextBlock that is bound to a string that represents the status of a process in my application.

Loading dl-debug.c in gdb / Ubuntu 14.04.4 LTS

c++ linux debugging ubuntu gdb

When I use gdb xxx, while loading, this is the result: