Gradle Android studio 1.0渐变错误1-找不到指定的路径

Gradle Android studio 1.0渐变错误1-找不到指定的路径,gradle,android-studio,Gradle,Android Studio,我刚刚在Win7上安装了Android studio,并希望编译第一个示例代码,但编译失败 Executing tasks: [:app:assembleDebug] Configuration on demand is an incubating feature. :app:preBuil :app:compileDebugNdk UP-TO-DATE :app:preDebugBuild :app:checkDebugManifest :app:preReleaseBuild :app:

我刚刚在Win7上安装了Android studio,并希望编译第一个示例代码,但编译失败

Executing tasks: [:app:assembleDebug]

Configuration on demand is an incubating feature.

:app:preBuil
:app:compileDebugNdk UP-TO-DATE
:app:preDebugBuild
:app:checkDebugManifest
:app:preReleaseBuild
:app:prepareComAndroidSupportAppcompatV72102Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42102Library 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

Den angivne sti blev ikke fundet. (The specified path was not found.)

 FAILED

Den angivne sti blev ikke fundet. (The specified path was not found.)

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:
C:\Users\Sigmac\AppData\Local\Android\sdk\build-tools\21.1.1\dx.bat --dex --output 
C:\Users\Sigmac\AndroidStudioProjects\Voting\app\build\intermediates\pre-dexed\debug
\classes-b6f615fe9376219a5b11445078329964f51dafd9.jar C:\Users\Sigmac
\AndroidStudioProjects\Voting\app\build\intermediates\exploded-aar\com.android.support
\appcompat-v7\21.0.2\classes.jar

Error Code:
1

Output:
Den angivne sti blev ikke fundet. (The specified path was not found.)

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

Den angivne sti blev ikke fundet. (The specified path was not found.)
我已经测试过该eksist: C:\Users\Sigmac\AppData\Local\Android\sdk\build tools\21.1.1\dx.bat

此文件夹不存在,但不可用 C:\Users\Sigmac\AndroidStudioProjects\Voting\app\build\intermediates\pre-dexed\debug\

这是埃克西斯吗 C:\Users\Sigmac\AndroidStudioProjects\Voting\app\build\intermediates\aar\com.android.support\appcompat-v7\21.0.2\classes.jar

我有谷歌搜索这个网站,但找不到解决办法

-stacktrace、-info或-debug不更改结果

我从cmd直接尝试了同样的结果 我试过这条路

有人能给我指出一个解决方案吗?

这是一个bug,应该在SDK的24.0.1版本中修复,该版本现在可用


错误在于查找Java发行版的内部脚本在32位Windows系统上无法正常工作。

安装、卸载和编辑C:\Users\Annika\Android\Android sdk\build tools\21.1.1\dx.bat的组合,以设置Java_exe=if exist%~dp0..\tools\lib\find_Java.bat调用%~dp0..\tools\lib\find_java.bat如果存在%~dp0..\tools\lib\find_java.bat调用%~dp0..\tools\lib\find_java.bat如果没有定义java_exe goto:EOF set java_exe=C:\Program Files\java\jre1.8.0_25\bin\java.exe让它工作了我不知道我是否做错了,但它并没有单独解决问题。