Android studio 1.0.1中的“本地路径不存在”和Gradle错误代码:255

时间:2014-12-13 17:18:08

标签: android android-studio android-gradle

当我尝试通过Android Studio 1.0.1在移动设备上运行应用程序时,我遇到了这个问题。 事实上,我已经阅读了很多关于这个bug的帖子,其中大部分是关于android studio的旧版本。但我认为这个bug在最新版本中仍然存在。帮我解决..

DEBUG窗口日志:

Waiting for device.
Target device: sony-c2004-YT910HWF5A
Uploading file
    local path: C:\Users\computer\AndroidStudioProjects\testapp\app\build\outputs\apk\app-debug.apk
    remote path: /data/local/tmp/com.example.computer.testapp
Local path doesn't exist.

Gradle控制台日志:

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: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
'reg' is not recognized as an internal or external command,
operable program or batch file.
'reg' is not recognized as an internal or external command,
operable program or batch file.
 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:
    C:\Users\computer\AppData\Local\Android\sdk\build-tools\21.1.2\dx.bat --dex --output C:\Users\computer\AndroidStudioProjects\testapp\app\build\intermediates\pre-dexed\debug\support-annotations-21.0.3-e2f98987ccd5ddedc568c92f77e92365ed764b2e.jar C:\Users\computer\AppData\Local\Android\sdk\extras\android\m2repository\com\android\support\support-annotations\21.0.3\support-annotations-21.0.3.jar
Error Code:
    255
Output:
    'reg' is not recognized as an internal or external command,
    operable program or batch file.
* 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: 16.162 secs

0 个答案:

没有答案