应用不会在Android Studio 1.0上运行

时间:2014-12-12 18:06:20

标签: android compiler-errors android-studio

我的应用程序工作正常,直到我将Android Studio更新为1.0版本。 我有Android SDK Tools 24.0.1。

这是我得到的错误:

Executing tasks: [:app:assembleDebug]

Configuration on demand is an incubating feature.
:app:preBuild
:app:compileDebugNdk UP-TO-DATE
:app:preDebugBuild
:app:checkDebugManifest
:app:preReleaseBuild
:app:prepareComAndroidSupportAppcompatV72103Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42103Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices6587Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:compileDebugJava UP-TO-DATE
:app:preDexDebug UP-TO-DATE
:app:dexDebug
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: C:\Users\xxx\Documents\Android Studio\MyApp\app\build\intermediates\classes\debug: file not found
    at com.android.dex.util.FileUtils.readFile(FileUtils.java:51)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:169)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:632)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
    at com.android.dx.command.dexer.Main.run(Main.java:246)
    at com.android.dx.command.dexer.Main.main(Main.java:215)
    at com.android.dx.command.Main.main(Main.java:106)

UNEXPECTED TOP-LEVEL EXCEPTION:
java.io.FileNotFoundException: C:\Users\xxx\Documents\Android Studio\MyApp\app\build\intermediates\pre-dexed\debug\support-annotations-21.0.3-71bf1c09c894d137e5d51b7adc57d841540dfd83.jar (System nie może odnaleźć określonej ścieżki)
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:632)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
    at com.android.dx.command.dexer.Main.run(Main.java:246)
    at com.android.dx.command.dexer.Main.main(Main.java:215)
    at com.android.dx.command.Main.main(Main.java:106)

UNEXPECTED TOP-LEVEL EXCEPTION:
java.io.FileNotFoundException: C:\Users\xxx\Documents\Android Studio\MyApp\app\build\intermediates\pre-dexed\debug\internal_impl-21.0.3-113e2d23f5b5bc127ff84eaafaae47b85fbe1475.jar (System nie może odnaleźć określonej ścieżki)
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:632)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
    at com.android.dx.command.dexer.Main.run(Main.java:246)
    at com.android.dx.command.dexer.Main.main(Main.java:215)
    at com.android.dx.command.Main.main(Main.java:106)

UNEXPECTED TOP-LEVEL EXCEPTION:
java.io.FileNotFoundException: C:\Users\xxx\Documents\Android Studio\MyApp\app\build\intermediates\pre-dexed\debug\classes-2d4ee936f87ff2549f27042a3415c7d6d8a386fd.jar (System nie może odnaleźć określonej ścieżki)
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:632)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
    at com.android.dx.command.dexer.Main.run(Main.java:246)
    at com.android.dx.command.dexer.Main.main(Main.java:215)
    at com.android.dx.command.Main.main(Main.java:106)

UNEXPECTED TOP-LEVEL EXCEPTION:
java.io.FileNotFoundException: C:\Users\xxx\Documents\Android Studio\MyApp\app\build\intermediates\pre-dexed\debug\classes-d0bd6911a463f47c090a7575daf8e9d6fc42bc40.jar (System nie może odnaleźć określonej ścieżki)
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:632)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
    at com.android.dx.command.dexer.Main.run(Main.java:246)
    at com.android.dx.command.dexer.Main.main(Main.java:215)
    at com.android.dx.command.Main.main(Main.java:106)

UNEXPECTED TOP-LEVEL EXCEPTION:
java.io.FileNotFoundException: C:\Users\xxx\Documents\Android Studio\MyApp\app\build\intermediates\pre-dexed\debug\classes-fc4135d9bfae177edee108f79b17ad5e85d2438e.jar (System nie może odnaleźć określonej ścieżki)
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:632)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
    at com.android.dx.command.dexer.Main.run(Main.java:246)
    at com.android.dx.command.dexer.Main.main(Main.java:215)
    at com.android.dx.command.Main.main(Main.java:106)
6 errors; aborting

 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
    F:\Android SDK\sdk\build-tools\21.1.2\dx.bat --dex --no-optimize --output C:\Users\xxx\Documents\Android Studio\NiezbędnikGeodety\app\build\intermediates\dex\debug --input-list=C:\Users\xxx\Documents\Android Studio\NiezbędnikGeodety\app\build\intermediates\tmp\dex\debug\inputList.txt
Error Code:
    1
Output:

    UNEXPECTED TOP-LEVEL EXCEPTION:
    java.lang.RuntimeException: C:\Users\xxx\Documents\Android Studio\MyApp\app\build\intermediates\classes\debug: file not found
        at com.android.dex.util.FileUtils.readFile(FileUtils.java:51)
        at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:169)
        at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        at com.android.dx.command.dexer.Main.processOne(Main.java:632)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
        at com.android.dx.command.dexer.Main.run(Main.java:246)
        at com.android.dx.command.dexer.Main.main(Main.java:215)
        at com.android.dx.command.Main.main(Main.java:106)

    UNEXPECTED TOP-LEVEL EXCEPTION:
    java.io.FileNotFoundException: C:\Users\xxx\Documents\Android Studio\MyApp\app\build\intermediates\pre-dexed\debug\support-annotations-21.0.3-71bf1c09c894d137e5d51b7adc57d841540dfd83.jar (System nie może odnaleźć określonej ścieżki)
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
        at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
        at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        at com.android.dx.command.dexer.Main.processOne(Main.java:632)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
        at com.android.dx.command.dexer.Main.run(Main.java:246)
        at com.android.dx.command.dexer.Main.main(Main.java:215)
        at com.android.dx.command.Main.main(Main.java:106)

    UNEXPECTED TOP-LEVEL EXCEPTION:
    java.io.FileNotFoundException: C:\Users\xxx\Documents\Android Studio\MyApp\app\build\intermediates\pre-dexed\debug\internal_impl-21.0.3-113e2d23f5b5bc127ff84eaafaae47b85fbe1475.jar (System nie może odnaleźć określonej ścieżki)
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
        at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
        at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        at com.android.dx.command.dexer.Main.processOne(Main.java:632)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
        at com.android.dx.command.dexer.Main.run(Main.java:246)
        at com.android.dx.command.dexer.Main.main(Main.java:215)
        at com.android.dx.command.Main.main(Main.java:106)

    UNEXPECTED TOP-LEVEL EXCEPTION:
    java.io.FileNotFoundException: C:\Users\xxx\Documents\Android Studio\MyApp\app\build\intermediates\pre-dexed\debug\classes-2d4ee936f87ff2549f27042a3415c7d6d8a386fd.jar (System nie może odnaleźć określonej ścieżki)
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
        at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
        at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        at com.android.dx.command.dexer.Main.processOne(Main.java:632)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
        at com.android.dx.command.dexer.Main.run(Main.java:246)
        at com.android.dx.command.dexer.Main.main(Main.java:215)
        at com.android.dx.command.Main.main(Main.java:106)

    UNEXPECTED TOP-LEVEL EXCEPTION:
    java.io.FileNotFoundException: C:\Users\xxx\Documents\Android Studio\MyApp\app\build\intermediates\pre-dexed\debug\classes-d0bd6911a463f47c090a7575daf8e9d6fc42bc40.jar (System nie może odnaleźć określonej ścieżki)
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
        at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
        at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        at com.android.dx.command.dexer.Main.processOne(Main.java:632)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
        at com.android.dx.command.dexer.Main.run(Main.java:246)
        at com.android.dx.command.dexer.Main.main(Main.java:215)
        at com.android.dx.command.Main.main(Main.java:106)

    UNEXPECTED TOP-LEVEL EXCEPTION:
    java.io.FileNotFoundException: C:\Users\xxx\Documents\Android Studio\MyApp\app\build\intermediates\pre-dexed\debug\classes-fc4135d9bfae177edee108f79b17ad5e85d2438e.jar (System nie może odnaleźć określonej ścieżki)
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
        at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
        at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        at com.android.dx.command.dexer.Main.processOne(Main.java:632)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:280)
        at com.android.dx.command.dexer.Main.run(Main.java:246)
        at com.android.dx.command.dexer.Main.main(Main.java:215)
        at com.android.dx.command.Main.main(Main.java:106)
    6 errors; aborting


* 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: 4.334 secs

我的build.gradle文件

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.xxx.MyApp"
        minSdkVersion 9
        targetSdkVersion 21
        versionCode 1
        versionName '0.1'
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile 'com.google.android.gms:play-services:6.5.87'
}

你有什么想法吗?如果你需要更多的代码,我会粘贴它。

新错误

C:\Users\xxx\Documents\AndroidStudio\MyApp\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.3\res\drawable-xhdpi\abc_ab_share_pack_holo_light.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\xxx\Documents\AndroidStudio\MyApp\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.3\res\drawable-hdpi\abc_spinner_mtrl_am_alpha.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\xxx\Documents\AndroidStudio\MyApp\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.3\res\drawable-hdpi\abc_ab_share_pack_holo_dark.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\xxx\Documents\AndroidStudio\MyApp\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.3\res\drawable-hdpi\abc_ab_share_pack_holo_light.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\xxx\Documents\AndroidStudio\MyApp\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.3\res\drawable-xhdpi\abc_ab_share_pack_holo_dark.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\xxx\Documents\AndroidStudio\MyApp\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.3\res\drawable-mdpi\abc_ab_share_pack_holo_dark.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited

:app:processDebugManifest
:app:processDebugResources
:app:generateDebugSources
:app:compileDebugJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

0 个答案:

没有答案