美文网首页技术文
AS遇到的问题

AS遇到的问题

作者: hp简书 | 来源:发表于2016-06-22 13:14 被阅读35次

    Q 一些jar包提示
    Failed to resolve: com.squareup.retrofit:retrofit:1.9.0
    Failed to resolve: com.squareup.okhttp:2.2.0

    The problem was fixed by creating a higher level build.gradle file and moved the following code into it

    buildscript {
      repositories {
        jcenter()
      }
      dependencies {
        classpath 'com.android.tools.build:gradle:1.1.2'
      }
    }
    
    allprojects {
      repositories {
        jcenter()
      }
    }
    

    Q:Failed to resolve:某个aar包
    A:设置gradle属性

     repositories {
         //let gradle find aar in The libs directory instead of declared repository.
        flatDir {
            dirs 'libs'
        }
    }
    

    Q:merage清单文件时报错
    A:在工程清单文件中配置替代 icon name lable 等

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.mycompany.myapp"
    xmlns:tools="http://schemas.android.com/tools">
    
    <application
        android:label="@string/app_name"
        tools:replace="android:icon, android:name,android:theme"/>
    </manifest>
    

    相关文章

      网友评论

        本文标题:AS遇到的问题

        本文链接:https://www.haomeiwen.com/subject/pqfndttx.html