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

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. 【Android】配置文件属性说明
  2. android listview 右滑删除(android 项目心得五)
  3. 新添的Activity 要在 manifest 中注册 否则界面跳转时会崩掉
  4. Android(安卓)运行 Linux 可执行程序
  5. Android(安卓)BLE Gatt实现原理解析(未完)
  6. android 自定义ListView中的单项选择
  7. Android(安卓)helloword demo程序不能运行
  8. Android(安卓)解决布局问题
  9. Android开发7:单元测试

随机推荐

  1. Android(安卓)数据存储方式有哪几种
  2. SystemUI下的RecentActivity
  3. android使用Activity
  4. Eclipse运行工程报AVD没有找到错误解决过
  5. Cocos 2d-x 3.8 在ubuntu下使用QtCreator
  6. Android(安卓)OpenGL ES 包及流程摘要
  7. 在Android中访问WebService接口
  8. 电话短信问题
  9. android quick settings中去掉不需要的图
  10. android画图---图像的扭曲