在Android Studio上发布构建项目 - support-v4

时间:2015-06-18 20:25:16

标签: android gradle android-gradle build.gradle

我在Android工作室项目上运行和构建apk时遇到了问题,我正在搜索和搜索,但无法找到适合我问题的解决方案。

Gradle控制台堆栈跟踪:

trouble writing output: D:\android-sdk-windows\Shairlook-Def-git\app\build\intermediates\pre-dexed\debug\internal_impl-22.0.0-f0c61aa475a654ffa9a9c544ec7d938bf31cfae2.jar (El sistema no puede encontrar la ruta especificada)

FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:preDexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
D:\android-sdk-windows\sdk\build-tools\21.1.2\dx.bat --dex --output    D:\android-sdk-windows\Shairlook-Def-git\app\build\intermediates\pre-dexed\debug\internal_impl-22.0.0-f0c61aa475a654ffa9a9c544ec7d938bf31cfae2.jar D:\android-sdk-windows\Shairlook-Def-git\app\build\intermediates\exploded-aar\com.android.support\support-v4\22.0.0\libs\internal_impl-22.0.0.jar
Error Code:
3
Output:
El sistema no puede encontrar la ruta especificada.
El sistema no puede encontrar la ruta especificada.
El sistema no puede encontrar la ruta especificada.

trouble writing output: D:\android-sdk-windows\Shairlook-Def-git\app\build\intermediates\pre-dexed\debug\internal_impl-22.0.0-f0c61aa475a654ffa9a9c544ec7d938bf31cfae2.jar (El sistema no puede encontrar la ruta especificada)


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 7.202 secs

这是我的模块build.gradle文件:

apply plugin: 'com.android.application'

repositories {
    mavenCentral()
}

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

defaultConfig {
    applicationId "com.example.shairlook"
    minSdkVersion 10
    targetSdkVersion 21
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile 'com.etsy.android.grid:library:1.0.5'
    compile 'eu.ocathain.com.sun.mail:javax.mail:1.5.2'
    compile 'com.google.android.gms:play-services:7.0.0'
    compile 'org.igniterealtime.smack:smack-android-extensions:4.1.0'
    compile 'org.igniterealtime.smack:smack-tcp:4.1.0'
}

关于它可能是什么的任何想法?

我无法弄明白,任何人都可以对此有所了解吗?

提前致谢!

1 个答案:

答案 0 :(得分:0)

Alrighty

解决方案是更新我项目的// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.2.3' } } allprojects { repositories { jcenter() } } 上的gradle,而不是模块

0.9.0

以前设置为{{1}},谢谢。