运行项目时出现如下错误:

Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
D:\WorkBook\iflytek\android\Android\sdk\build-tools\21.1.1\dx.bat --dex --no-optimize --output D:\Androidspace\Helloworld\app\build\intermediates\dex\debug --input-list=D:\Androidspace\Helloworld\app\build\intermediates\tmp\dex\debug\inputList.txt
Error Code:
1
Output:
系统找不到指定的路径。


解决方案如下:
找到安装根目录下find_java.bat文件
D:\WorkBook\iflytek\android\Android\sdk\tools\lib\find_java.bat
编辑文件27行处的代码:
In line 27 of tools/lib/find_java.bat has a problem:
find /i "x86" > NUL && set arch_ext=32 || set arch_ext=64
删除||符号前的空格,程序执行通过:
You must remove space after "arch_ext=32". Correct code is:
find /i "x86" > NUL && set arch_ext=32|| set arch_ext=64


解决方案原因不明,当前项目虽不报错,但无法通过模拟器运行,真机调试正常,如果有知道如何在模拟器上成功运行的朋友,请指点一下。

更多相关文章

  1. 在sd卡存储文件
  2. Received status code 400 from server: Bad Request解决方案
  3. Android横竖屏切换解决方案
  4. 读取raw文件下文件内容
  5. 关于Android启动页全屏的解决方案
  6. 安卓Android大量项目源码实例
  7. 基于Android的音乐播放器项目
  8. android intent.setType指定浏览本地多种类型的文件

随机推荐

  1. Android 禁止屏幕旋转 & 旋转屏幕时保持A
  2. 从源码解析-Android中进程间通信Binder机
  3. WebKit 分析–for android【new】
  4. Android属性动画完全解析(上),初识属性动
  5. Android的Animation之LayoutAnimation使
  6. android proguard webview javascript in
  7. Cocos2D-HTML5 Android项目编译
  8. Android LinearLayout Weight issues
  9. Android中显示进度的控件
  10. 今天和大家讲一下怎么样简单的把壁纸作为