zoukankan      html  css  js  c++  java
  • android studio学习----Warning:Unable to find optional library: org.apache.http.legacy

    主要是没有  android-23的版本

    1、导入工程以后

    Error:Could not find com.Android.tools.build:gradle:1.3.1.

    Searched in the following locations:
        file:/E:/android-studio/gradle/m2repository/com/android/tools/build/gradle/1.3.1/gradle-1.3.1.pom
        file:/E:/android-studio/gradle/m2repository/com/android/tools/build/gradle/1.3.1/gradle-1.3.1.jar
        http://mirrors.ibiblio.org/maven2/com/android/tools/build/gradle/1.3.1/gradle-1.3.1.pom
        http://mirrors.ibiblio.org/maven2/com/android/tools/build/gradle/1.3.1/gradle-1.3.1.jar
    Required by:
        :DynamicAPK-master:unspecified

    解决这个问题根据提示打开E:/android-studio/gradle/m2repository/com/android/tools/build/gradle看看该目录下有几个版本

    修改成本地存在的即可



    2:编译工具找不到

    Error:A problem occurred configuring project ':bundle'.

    > failed to find Build Tools revision 21.1.2


    file --> default settings --- android sdk --> sdk Tools选项卡
    看看sdk manager上安装的版本号是多少,  修改成存在的即可




    3 lib找不到

    Error:A problem occurred configuring project ':bundle'.

    > Unable to find optional library: org.apache.http.legacy


    Add org.apache.http.legacy.jar which is in Android/Sdk/platforms/android-23/optional folder to app/libs directory and sync your project

    添加org.apache.http.legacy.jar 这个jar到android sdk安装目录下的 /android-23/optional

    没有的话就去网上下载吧


    4、

    Error:(7, 1) A problem occurred evaluating project ':demo1'.
    > Could not resolve all dependencies for configuration 'classpath'.
       > Could not resolve net.sf.proguard:proguard-gradle:5.2.1.
         Required by:
             unspecified:unspecified:unspecified
          > Could not resolve net.sf.proguard:proguard-gradle:5.2.1.
             > Could not get resource 'https://repo1.maven.org/maven2/net/sf/proguard/proguard-gradle/5.2.1/proguard-gradle-5.2.1.pom'.
                > Could not GET 'https://repo1.maven.org/maven2/net/sf/proguard/proguard-gradle/5.2.1/proguard-gradle-5.2.1.pom'.

                   > peer not authenticated

    这个是用于没法访问 https://repo1.maven.org/maven2/net/sf/proguard/proguard-gradle/5.2.1/proguard-gradle-5.2.1.pom

    没办法只能翻墙了

  • 相关阅读:
    Working with macro signatures
    Reset and Clear Recent Items and Frequent Places in Windows 10
    git分支演示
    The current .NET SDK does not support targeting .NET Core 2.1. Either target .NET Core 2.0 or lower, or use a version of the .NET SDK that supports .NET Core 2.1.
    Build website project by roslyn through devenv.com
    Configure environment variables for different tools in jenkins
    NUnit Console Command Line
    Code Coverage and Unit Test in SonarQube
    头脑王者 物理化学生物
    头脑王者 常识,饮食
  • 原文地址:https://www.cnblogs.com/wust221/p/5438644.html
Copyright © 2011-2022 走看看