【问题标题】:HTTP proxy error in Android StudioAndroid Studio 中的 HTTP 代理错误
【发布时间】:2017-09-25 07:16:24
【问题描述】:

我一直在尝试在许多 PC 上安装 Android Studio。

在某些 PC 中,我遇到了 HTTP 代理 错误和 离线同步 问题。因此,我不得不卸载并重新安装整个工作室。虽然这种方法在某些情况下效果很好,但在另一些情况下问题仍然存在。

离线安装有问题吗 或者 安装 Android Studio 时是否必须连接互联网且没有任何错误?

打开新项目时还有另一个突出的错误,junit::junit

我是初学者,请在回答我时记住这一点。

谢谢。

【问题讨论】:

    标签: android android-studio junit http-proxy


    【解决方案1】:

    useLibrary 'org.apache.http.legacy' 像下面的代码一样放入 build.gradle 并重建您的项目;

    android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    useLibrary 'org.apache.http.legacy'
    defaultConfig {
        applicationId "com.user.appname"
        minSdkVersion 19
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    lintOptions {
        checkReleaseBuilds false
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-12-20
      • 1970-01-01
      • 2015-08-02
      • 2011-05-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多