我最近一直遇到问题,最近我尝试导入一个项目并最终下载了一个较旧的SDK,我是开发新手,所以我不确定我是什么&#39已完成。 在eclipse中执行此操作后,我在以前工作的所有项目中都出现错误,错误如"导入android.os无法解决","活动无法解析为类型"。 ..基本上每一行都是错误的......我也有IntelliJ,那里的项目也无法上传到我的手机......请帮我解决这个问题,它让我发疯了!
eclipse的截图:http://imageshack.com/a/img208/603/ce52.png
IntelliJ logcat:
03-17 23:48:29.991 258-268 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:29.991 258-268 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:30.319 258-258 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:30.319 258-258 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:30.653 258-473 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:30.653 258-473 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:30.983 258-1876 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:30.984 258-1876 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:31.313 258-1705 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:31.313 258-1705 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:31.649 258-268 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:31.650 258-268 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:31.985 258-258 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:31.985 258-258 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:32.317 258-473 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:32.317 258-473 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:32.639 258-1876 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:32.639 258-1876 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:32.970 258-1705 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:32.970 258-1705 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:33.298 258-268 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:33.298 258-268 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:33.632 258-258 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:33.632 258-258 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:33.965 258-473 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:33.965 258-473 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:34.240 258-324 /? E / ConnectivityService:尝试删除路由的异常:java.lang.IllegalStateException:无法与本机dameon通信以添加路由 - com.android.server.NativeDaemonConnectorException:Cmd {interface route remove wlan0 default 192.168.1.1 32 0.0.0.0}代码400失败:{无法从默认表中删除路由(没有这样的进程)} 03-17 23:48:34.244 258-324 /? E / ConnectivityService:尝试删除路由的异常:java.lang.IllegalStateException:无法与本机dameon通信以添加路由 - com.android.server.NativeDaemonConnectorException:Cmd {interface route remove wlan0 default 0.0.0.0 0 192.168.1.1}代码400失败:{无法从默认表中删除路由(没有这样的进程)} 03-17 23:48:34.400 258-5416 /? E / StateMachine:DhcpStateMachine - unhandledMessage:msg.what = -1 03-17 23:48:34.514 258-1706 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:34.514 258-1706 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:34.839 258-1881 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:34.839 258-1881 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:35.175 258-468 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:35.175 258-468 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:35.501 258-1876 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:35.501 258-1876 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:35.824 258-1705 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:35.824 258-1705 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:36.160 258-268 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:36.161 258-268 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:36.493 258-1881 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:36.493 258-1881 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:36.815 258-468 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:36.816 258-468 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:37.155 258-1876 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:37.155 258-1876 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:37.314 258-325 /? E / StateMachine:TetherMaster - unhandledMessage:msg.what = 3 03-17 23:48:37.506 258-269 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:37.506 258-269 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:37.855 258-519 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:37.855 258-519 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget 03-17 23:48:38.245 258-1705 /? E / AppWidgetService:id = com.android.server.AppWidgetService$AppWidgetId@4237fb88id.host = com.jrdcom.launcher 03-17 23:48:38.245 258-1705 /? E / AppWidgetService:id.provider = com.jrdcom.musicwidget ........并永远继续......
答案 0 :(得分:0)
尝试运行Android sdk管理器(" android"在linux上)并确保安装了所有内容(即所需的SDK)。网上有大量资源说明如何设置SDK。检查你的android sdk环境指向正确的位置 - 再次有很多资源专用于此但你不提及你的操作系统/平台。在我的linux系统上,它设置在my.bash_env中:
export ANDROIDSDK="${HOME}"/development/android/sdk
export ANDROID_HOME="${HOME}"/development/android/sdk
PATH=${ANDROIDSDK}/tools:${ANDROIDSDK}/platform-tools:${PATH}
export _JAVA_AWT_WM_NONREPARENTING=1
确保您已选择正确的SDK以在IDE中构建项目。确保为您的项目选择了正确的TARGET min和MAX版本:并确保按照我在上面第一句中的说明安装它们。祝你好运。