我在this site中提到同样的问题,
当我试图运行我的项目时,错误对话框显示:
我已经在该网站做同样的事情来解决问题 但它对我不起作用
这是我为解决这个问题所做的事情:
1.将JAVA_HOME设置为右路径
2.添加-Xmx256m Gradle VM选项或更高版本
3.清理项目但是......项目无法清理并显示与“运行项目错误”对话框
这是我的日志:
03-29 07:05:48.993 2621-2644/info.androidhive.customlistviewvolley D/libEGL﹕ loaded /system/lib/egl/libEGL_emulation.so
03-29 07:05:48.994 2621-2644/info.androidhive.customlistviewvolley D/libEGL﹕ loaded /system/lib/egl/libGLESv1_CM_emulation.so
03-29 07:05:49.003 2621-2644/info.androidhive.customlistviewvolley D/libEGL﹕ loaded /system/lib/egl/libGLESv2_emulation.so
03-29 07:05:49.065 2621-2644/info.androidhive.customlistviewvolley D/:HostConnection::get() New Host Connection established 0xafe0b770, tid 2644
03-29 07:05:49.454 2621-2644/info.androidhive.customlistviewvolley I/OpenGLRenderer﹕ Initialized EGL, version 1.4
03-29 07:05:49.504 2621-2644/info.androidhive.customlistviewvolley D/OpenGLRenderer﹕ Enabling debug mode 0
03-29 07:05:49.521 2621-2644/info.androidhive.customlistviewvolley W/EGL_emulation﹕ eglSurfaceAttrib not implemented
03-29 07:05:49.521 2621-2644/info.androidhive.customlistviewvolley W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xafe08f40, error=EGL_SUCCESS
03-29 07:05:49.622 2621-2644/info.androidhive.customlistviewvolley W/EGL_emulation﹕ eglSurfaceAttrib not implemented
03-29 07:05:49.623 2621-2644/info.androidhive.customlistviewvolley W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xafe08f60, error=EGL_SUCCESS
03-29 07:05:49.701 2621-2621/info.androidhive.customlistviewvolley I/Choreographer﹕ Skipped 61 frames! The application may be doing too much work on its main thread.
03-29 07:05:56.280 2621-2621/info.androidhive.customlistviewvolley D/Volley﹕ [1] 2.onErrorResponse: MainActivity
03-29 07:05:56.348 2621-2621/info.androidhive.customlistviewvolley D/Volley﹕ [1] Request.finish: 7671 ms: [ ] http://10.0.3.2/sinDicel/json/movies1.json 0x1e7db5ea NORMAL 1
03-29 07:08:20.158 2621-2631/info.androidhive.customlistviewvolley I/art﹕ Debugger is no longer active
请帮助我尽快完成我的项目
谢谢
答案 0 :(得分:0)
重新启动Android Studio,重新启动PC?
听起来很愚蠢,但你知道......你永远不会知道^^
之后,可能会尝试将项目导入Android Studio。
然后没有更多的想法,所以如果它仍然无法重新安装它。包括SDK。
仍然无法运作?重新安装java。
答案 1 :(得分:0)
在我的情况下,原因是strings.xml资源文件中的撇号。
例如更改此内容:
<string name="edit_message">Don't do this</string>
要:
<string name="edit_message">But this</string>
答案 2 :(得分:0)
您应该重新启动计算机和Android Studio。下载最新的gradle。