Idea gradle android 开发问题

Idea gradle android 开发问题1:

* What went wrong:

A problem occurred configuring project ':app'.

> Could not resolve all dependencies for configuration ':app:_debugCompile'.

   > Could not find com.android.support:support-v4:21.0.3.

     Searched in the following locations:

         http://nexus.cabletech.com.cn/content/groups/public/com/android/support/support-v4/21.0.3/support-v4-21.0.3.pom

         http://nexus.cabletech.com.cn/content/groups/public/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar

         https://repo1.maven.org/maven2/com/android/support/support-v4/21.0.3/support-v4-21.0.3.pom

         https://repo1.maven.org/maven2/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar

         https://jcenter.bintray.com/com/android/support/support-v4/21.0.3/support-v4-21.0.3.pom

         https://jcenter.bintray.com/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar

     Required by:

         workspace:app:unspecified > com.facebook.fresco:fresco:0.5.3 > com.facebook.fresco:drawee:0.5.3

         workspace:app:unspecified > com.facebook.fresco:fresco:0.5.3 > com.facebook.fresco:imagepipeline:0.5.3

         

解决办法:

一般都是因为Android SDK Manager中没有下载Extras下的Android Support Repository 

没有下载导致的。

 参考:http://vjson.com/wordpress/could-not-find-com-android-support.html

Idea gradle android 开发问题2:

* What went wrong:

Execution failed for task ':app:processArmeabiDebugResources'.

> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'E:\android-sdk\sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1

解决方法:

在build.gradle中引入的依赖包中不能使用“+”。

之前:

dependencies {

    //compile fileTree(dir: 'libs', include: ['*.jar'])

    compile 'com.android.support:appcompat-v7:22.2.+'

    compile 'com.google.code.gson:gson:2.3.1'

    //compile 'com.squareup.picasso:picasso:2.5.2'

    //compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'

    compile 'de.greenrobot:eventbus:2.4.0'

    compile 'com.facebook.fresco:fresco:0.5.3'

    compile 'com.squareup.okhttp:okhttp:2.4.0'

    //compile 'com.squareup.retrofit:retrofit:1.9.0'

    compile('com.mikepenz:materialdrawer:3.1.2@aar') {

        transitive = true

    }

    compile 'com.android.support:design:22.2.+'

    compile 'com.mikepenz:octicons-typeface:2.2.0@aar'

    compile 'com.rengwuxian.materialedittext:library:2.1.4@aar'

    compile files('libs/AMap_3DMap_V2.4.1.jar')

    compile files('libs/Android_Location_V1.3.2.jar')

    compile files('libs/Android_Navi_V1.1.2.jar')

    compile files('libs/Msc.jar')

    compile files('libs/AMap_Services_V2.4.0.jar')

之后:

dependencies {

    //compile fileTree(dir: 'libs', include: ['*.jar'])

    compile 'com.android.support:appcompat-v7:22.2.0'

    compile 'com.google.code.gson:gson:2.3.1'

    //compile 'com.squareup.picasso:picasso:2.5.2'

    //compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'

    compile 'de.greenrobot:eventbus:2.4.0'

    compile 'com.facebook.fresco:fresco:0.5.3'

    compile 'com.squareup.okhttp:okhttp:2.4.0'

    //compile 'com.squareup.retrofit:retrofit:1.9.0'

    compile('com.mikepenz:materialdrawer:3.1.2@aar') {

        transitive = true

    }

    compile 'com.android.support:design:22.2.0'

    compile 'com.mikepenz:octicons-typeface:2.2.0@aar'

    compile 'com.rengwuxian.materialedittext:library:2.1.4@aar'

    compile files('libs/AMap_3DMap_V2.4.1.jar')

    compile files('libs/Android_Location_V1.3.2.jar')

    compile files('libs/Android_Navi_V1.1.2.jar')

    compile files('libs/Msc.jar')

    compile files('libs/AMap_Services_V2.4.0.jar')

猜你喜欢

转载自mogee.iteye.com/blog/2230913
今日推荐