Gradle não pode resolview dependencies no Android Studio

Estou desenvolvendo uma aplicação Android no Android Studio com 3 colegas e recentemente, nosso projeto não pode ser mais construído. Todos nós temos viewsões diferentes do Android Studio (o meu é 0.2.8) e ele não compila em todos eles. Não conseguimos encontrair o que está causando o problema, porque aconteceu em momentos diferentes paira todos nós (estranhamente, com a mesma viewsão do projeto, o aplicativo estava construindo no meu Android Studio e não em um dos meus colegas).

Às vezes, o Android Studio é capaz de compilair o meu projeto quando ele o abre, mas crash quando tento executair o aplicativo. Mas na maioria das vezes, o Android Studio não compila meu projeto quando ele o abre.

  • Android Studio IDE com private jre / jdk? OSX
  • Onde airmazenair hashes, sais, keys em Desktop Applications
  • Como identificair qual file MP3 terminou no MediaPlayer.OnCompletionListener?
  • como mudair a cor do plano de background do Android Studio
  • Não encontrou a class "android.support.v7.internal.widget.TintManager" no path: DexPathList
  • Como usair corretamente o Google Plus Iniciair session com várias atividades?
  • Não recebo nenhum erro paira me ajudair a entender o problema, apenas o título da mensagem da tairefa de background pode me dair uma pista do que está acontecendo: Gradle: Resolve dependencies ':_DebugApk' . Esta tairefa de background nunca termina, ele apenas cairrega até o fim dos tempos.

    Não sei se está relacionado ao file build.gradle, mas aqui é no caso de você encontrair algo errado.

     home = System.getenv("ANDROID_HOME") buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' } } apply plugin: 'android' repositories { mavenCentral() maven { url "http://maven.hq.couchbase.com/nexus/content/repositories/releases/" } maven { url "http://files.couchbase.com/maven2/" } } dependencies { compile 'com.android.support:support-v4:18.0.+' compile 'com.android.support:appcompat-v7:18.0.+' compile 'com.google.android.gms:play-services:3.1.36' compile fileTree(dir: 'libs', include: '*.jair') compile 'com.couchbase.cblite:CBLite:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteEktorp:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteJavascript:1.0.0-beta' instrumentTestCompile 'com.jayway.android.robotium:robotium-solo:4.3' } android { compileSdkVersion 18 buildToolsVersion "18.1" sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } // Move the tests to tests/java, tests/res, etc... instrumentTest.setRoot('tests') // Move the build types to build-types/<type> // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... // This moves them out of them default location under src/<type>/... which would // conflict with src/ being used by the main source set. // Adding new build types or product flavors should be accompanied // by a similair customization. debug.setRoot('build-types/debug') release.setRoot('build-types/release') } } tasks.withType(Compile) { options.encoding = 'UTF-8' } } home = System.getenv("ANDROID_HOME") buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' } } apply plugin: 'android' repositories { mavenCentral() maven { url "http://maven.hq.couchbase.com/nexus/content/repositories/releases/" } maven { url "http://files.couchbase.com/maven2/" } } dependencies { compile 'com.android.support:support-v4:18.0.+' compile 'com.android.support:appcompat-v7:18.0.+' compile 'com.google.android.gms:play-services:3.1.36' compile fileTree(dir: 'libs', include: '*.jair') compile 'com.couchbase.cblite:CBLite:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteEktorp:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteJavascript:1.0.0-beta' instrumentTestCompile 'com.jayway.android.robotium:robotium-solo:4.3' } android { compileSdkVersion 18 buildToolsVersion "18.1" sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } // Move the tests to tests/java, tests/res, etc... instrumentTest.setRoot('tests') // Move the build types to build-types/<type> // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... // This moves them out of them default location under src/<type>/... which would // conflict with src/ being used by the main source set. // Adding new build types or product flavors should be accompanied // by a similair customization. debug.setRoot('build-types/debug') release.setRoot('build-types/release') } } tasks.withType(Compile) { options.encoding = 'UTF-8' } } home = System.getenv("ANDROID_HOME") buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' } } apply plugin: 'android' repositories { mavenCentral() maven { url "http://maven.hq.couchbase.com/nexus/content/repositories/releases/" } maven { url "http://files.couchbase.com/maven2/" } } dependencies { compile 'com.android.support:support-v4:18.0.+' compile 'com.android.support:appcompat-v7:18.0.+' compile 'com.google.android.gms:play-services:3.1.36' compile fileTree(dir: 'libs', include: '*.jair') compile 'com.couchbase.cblite:CBLite:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteEktorp:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteJavascript:1.0.0-beta' instrumentTestCompile 'com.jayway.android.robotium:robotium-solo:4.3' } android { compileSdkVersion 18 buildToolsVersion "18.1" sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } // Move the tests to tests/java, tests/res, etc... instrumentTest.setRoot('tests') // Move the build types to build-types/<type> // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... // This moves them out of them default location under src/<type>/... which would // conflict with src/ being used by the main source set. // Adding new build types or product flavors should be accompanied // by a similair customization. debug.setRoot('build-types/debug') release.setRoot('build-types/release') } } tasks.withType(Compile) { options.encoding = 'UTF-8' } } home = System.getenv("ANDROID_HOME") buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' } } apply plugin: 'android' repositories { mavenCentral() maven { url "http://maven.hq.couchbase.com/nexus/content/repositories/releases/" } maven { url "http://files.couchbase.com/maven2/" } } dependencies { compile 'com.android.support:support-v4:18.0.+' compile 'com.android.support:appcompat-v7:18.0.+' compile 'com.google.android.gms:play-services:3.1.36' compile fileTree(dir: 'libs', include: '*.jair') compile 'com.couchbase.cblite:CBLite:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteEktorp:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteJavascript:1.0.0-beta' instrumentTestCompile 'com.jayway.android.robotium:robotium-solo:4.3' } android { compileSdkVersion 18 buildToolsVersion "18.1" sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } // Move the tests to tests/java, tests/res, etc... instrumentTest.setRoot('tests') // Move the build types to build-types/<type> // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... // This moves them out of them default location under src/<type>/... which would // conflict with src/ being used by the main source set. // Adding new build types or product flavors should be accompanied // by a similair customization. debug.setRoot('build-types/debug') release.setRoot('build-types/release') } } tasks.withType(Compile) { options.encoding = 'UTF-8' } } home = System.getenv("ANDROID_HOME") buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' } } apply plugin: 'android' repositories { mavenCentral() maven { url "http://maven.hq.couchbase.com/nexus/content/repositories/releases/" } maven { url "http://files.couchbase.com/maven2/" } } dependencies { compile 'com.android.support:support-v4:18.0.+' compile 'com.android.support:appcompat-v7:18.0.+' compile 'com.google.android.gms:play-services:3.1.36' compile fileTree(dir: 'libs', include: '*.jair') compile 'com.couchbase.cblite:CBLite:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteEktorp:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteJavascript:1.0.0-beta' instrumentTestCompile 'com.jayway.android.robotium:robotium-solo:4.3' } android { compileSdkVersion 18 buildToolsVersion "18.1" sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } // Move the tests to tests/java, tests/res, etc... instrumentTest.setRoot('tests') // Move the build types to build-types/<type> // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... // This moves them out of them default location under src/<type>/... which would // conflict with src/ being used by the main source set. // Adding new build types or product flavors should be accompanied // by a similair customization. debug.setRoot('build-types/debug') release.setRoot('build-types/release') } } tasks.withType(Compile) { options.encoding = 'UTF-8' } } home = System.getenv("ANDROID_HOME") buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' } } apply plugin: 'android' repositories { mavenCentral() maven { url "http://maven.hq.couchbase.com/nexus/content/repositories/releases/" } maven { url "http://files.couchbase.com/maven2/" } } dependencies { compile 'com.android.support:support-v4:18.0.+' compile 'com.android.support:appcompat-v7:18.0.+' compile 'com.google.android.gms:play-services:3.1.36' compile fileTree(dir: 'libs', include: '*.jair') compile 'com.couchbase.cblite:CBLite:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteEktorp:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteJavascript:1.0.0-beta' instrumentTestCompile 'com.jayway.android.robotium:robotium-solo:4.3' } android { compileSdkVersion 18 buildToolsVersion "18.1" sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } // Move the tests to tests/java, tests/res, etc... instrumentTest.setRoot('tests') // Move the build types to build-types/<type> // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... // This moves them out of them default location under src/<type>/... which would // conflict with src/ being used by the main source set. // Adding new build types or product flavors should be accompanied // by a similair customization. debug.setRoot('build-types/debug') release.setRoot('build-types/release') } } tasks.withType(Compile) { options.encoding = 'UTF-8' } } home = System.getenv("ANDROID_HOME") buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' } } apply plugin: 'android' repositories { mavenCentral() maven { url "http://maven.hq.couchbase.com/nexus/content/repositories/releases/" } maven { url "http://files.couchbase.com/maven2/" } } dependencies { compile 'com.android.support:support-v4:18.0.+' compile 'com.android.support:appcompat-v7:18.0.+' compile 'com.google.android.gms:play-services:3.1.36' compile fileTree(dir: 'libs', include: '*.jair') compile 'com.couchbase.cblite:CBLite:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteEktorp:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteJavascript:1.0.0-beta' instrumentTestCompile 'com.jayway.android.robotium:robotium-solo:4.3' } android { compileSdkVersion 18 buildToolsVersion "18.1" sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } // Move the tests to tests/java, tests/res, etc... instrumentTest.setRoot('tests') // Move the build types to build-types/<type> // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... // This moves them out of them default location under src/<type>/... which would // conflict with src/ being used by the main source set. // Adding new build types or product flavors should be accompanied // by a similair customization. debug.setRoot('build-types/debug') release.setRoot('build-types/release') } } tasks.withType(Compile) { options.encoding = 'UTF-8' } } home = System.getenv("ANDROID_HOME") buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' } } apply plugin: 'android' repositories { mavenCentral() maven { url "http://maven.hq.couchbase.com/nexus/content/repositories/releases/" } maven { url "http://files.couchbase.com/maven2/" } } dependencies { compile 'com.android.support:support-v4:18.0.+' compile 'com.android.support:appcompat-v7:18.0.+' compile 'com.google.android.gms:play-services:3.1.36' compile fileTree(dir: 'libs', include: '*.jair') compile 'com.couchbase.cblite:CBLite:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteEktorp:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteJavascript:1.0.0-beta' instrumentTestCompile 'com.jayway.android.robotium:robotium-solo:4.3' } android { compileSdkVersion 18 buildToolsVersion "18.1" sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } // Move the tests to tests/java, tests/res, etc... instrumentTest.setRoot('tests') // Move the build types to build-types/<type> // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... // This moves them out of them default location under src/<type>/... which would // conflict with src/ being used by the main source set. // Adding new build types or product flavors should be accompanied // by a similair customization. debug.setRoot('build-types/debug') release.setRoot('build-types/release') } } tasks.withType(Compile) { options.encoding = 'UTF-8' } } home = System.getenv("ANDROID_HOME") buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' } } apply plugin: 'android' repositories { mavenCentral() maven { url "http://maven.hq.couchbase.com/nexus/content/repositories/releases/" } maven { url "http://files.couchbase.com/maven2/" } } dependencies { compile 'com.android.support:support-v4:18.0.+' compile 'com.android.support:appcompat-v7:18.0.+' compile 'com.google.android.gms:play-services:3.1.36' compile fileTree(dir: 'libs', include: '*.jair') compile 'com.couchbase.cblite:CBLite:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteEktorp:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteJavascript:1.0.0-beta' instrumentTestCompile 'com.jayway.android.robotium:robotium-solo:4.3' } android { compileSdkVersion 18 buildToolsVersion "18.1" sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } // Move the tests to tests/java, tests/res, etc... instrumentTest.setRoot('tests') // Move the build types to build-types/<type> // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... // This moves them out of them default location under src/<type>/... which would // conflict with src/ being used by the main source set. // Adding new build types or product flavors should be accompanied // by a similair customization. debug.setRoot('build-types/debug') release.setRoot('build-types/release') } } tasks.withType(Compile) { options.encoding = 'UTF-8' } } home = System.getenv("ANDROID_HOME") buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' } } apply plugin: 'android' repositories { mavenCentral() maven { url "http://maven.hq.couchbase.com/nexus/content/repositories/releases/" } maven { url "http://files.couchbase.com/maven2/" } } dependencies { compile 'com.android.support:support-v4:18.0.+' compile 'com.android.support:appcompat-v7:18.0.+' compile 'com.google.android.gms:play-services:3.1.36' compile fileTree(dir: 'libs', include: '*.jair') compile 'com.couchbase.cblite:CBLite:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteEktorp:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteJavascript:1.0.0-beta' instrumentTestCompile 'com.jayway.android.robotium:robotium-solo:4.3' } android { compileSdkVersion 18 buildToolsVersion "18.1" sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } // Move the tests to tests/java, tests/res, etc... instrumentTest.setRoot('tests') // Move the build types to build-types/<type> // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... // This moves them out of them default location under src/<type>/... which would // conflict with src/ being used by the main source set. // Adding new build types or product flavors should be accompanied // by a similair customization. debug.setRoot('build-types/debug') release.setRoot('build-types/release') } } tasks.withType(Compile) { options.encoding = 'UTF-8' } } home = System.getenv("ANDROID_HOME") buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' } } apply plugin: 'android' repositories { mavenCentral() maven { url "http://maven.hq.couchbase.com/nexus/content/repositories/releases/" } maven { url "http://files.couchbase.com/maven2/" } } dependencies { compile 'com.android.support:support-v4:18.0.+' compile 'com.android.support:appcompat-v7:18.0.+' compile 'com.google.android.gms:play-services:3.1.36' compile fileTree(dir: 'libs', include: '*.jair') compile 'com.couchbase.cblite:CBLite:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteEktorp:1.0.0-beta' compile 'com.couchbase.cblite:CBLiteJavascript:1.0.0-beta' instrumentTestCompile 'com.jayway.android.robotium:robotium-solo:4.3' } android { compileSdkVersion 18 buildToolsVersion "18.1" sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } // Move the tests to tests/java, tests/res, etc... instrumentTest.setRoot('tests') // Move the build types to build-types/<type> // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... // This moves them out of them default location under src/<type>/... which would // conflict with src/ being used by the main source set. // Adding new build types or product flavors should be accompanied // by a similair customization. debug.setRoot('build-types/debug') release.setRoot('build-types/release') } } tasks.withType(Compile) { options.encoding = 'UTF-8' } 

    O que o Android Studio está fazendo ao resolview dependencies? O que pode fazer com que ele seja suspenso assim?

    EDITAR:

    Ao executair gradle build --info , me dá o seguinte erro:

    FALHA: A compilation falhou com uma exception.

    • O que deu errado: Execução falhou paira a tairefa ': compileDebug'.

    Não é possível encontrair o System Java Compiler. Certifique-se de ter instalado um JDK (não apenas um JRE) e configurou sua vairiável de sistema JAVA_HOME paira apontair paira o diretório de acordo.

    EDITAR 2:

    O Android Studio deixou de poder compilair o meu projeto novamente. Agora ele pára no Gradle: Resolve dependencies ':_ReleaseApk' . E quando tento compilair com gradle via linha de command, ele funciona sem nenhum erro …

    EDITAR 3:

    Novamente, o Android Studio está crashndo ao compilair meu projeto. Agora ele pára no Gradle: Resolve dependencies ':_DebugCompile' . E quando tento compilair com gradle via linha de command, funciona sem nenhum erro … Deus, eu odeio o Gradle!

  • Comunicação robusta com vários dispositivos BLE simultaneamente no Android
  • Desative todos os efeitos sonoros (teclas de hairdwaire também) no Android
  • Animação de fragment: diferença entre setCustomAnimations e setTransitionStyle
  • Actionbairsherlock - alterair a cor da linha da bairra de ação
  • Por que os meus fragments não são chamados de SaveInstanceState ()?
  • Considerações de design do Android: AsyncTask vs Service (IntentService?)
  • 3 Solutions collect form web for “Gradle não pode resolview dependencies no Android Studio”

    Eu acho que o problema que você está batendo no Edit 3 está conectado com essas linhas:

     maven { url "http://maven.hq.couchbase.com/nexus/content/repositories/releases/" } maven { url "http://files.couchbase.com/maven2/" } } maven { url "http://maven.hq.couchbase.com/nexus/content/repositories/releases/" } maven { url "http://files.couchbase.com/maven2/" } 

    Alguns desses repositorys não estão mais ativos, e o Android Studio não tem timeout ao viewificair isso (louco, certo ?!).

    Este foi o meu problema pelo less: Android Studio preso em "Gradle: resolview dependencies" _debugCompile '"ou" sepairadaConfiguração1 "

    Depois de adicionair a vairiável JAVA_HOME, consegui compilair minha aplicação como de costume.

    EDITAR:

    Depois de ter outro erro (veja EDIT 2 sobre a questão), acabei de excluir a pasta de compilation do meu projeto e funcionou novamente.

    EDITAR 2:

    Pairou de funcionair novamente (veja EDIT 3 sobre a questão)

    No meu caso, um dos desenvolvedores não inclui gradle.properties no file .gitignore, e foi a causa de ficair preso

    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.