我的android应用程序内置Eclipse,突然无法编译几十个错误。 最明显的错误是指出所有android导入都无法解析。
import android.os.Bundle; import android.app.Activity; import android.graphics.drawable.Drawable; import android.media.AudioManager; import android.util.Log; import android.view.Menu; import android.view.View; import android.widget.Button; import android.widget.ImageView;所有这些都被标记为无法解析。 我尝试删除并重新添加JRE系统库。 我试过清洁和重建。 我已经尝试了“快速修复”选项来“修复项目设置...”,但只是回应一个对话框,说...
“ 没有提议找到解决对'android.app.Bundle'的无法解析的引用。点击此处手动配置项目'无声模式切换'的构建路径。
我是Android开发的新手,这个让我完全陷入困境。
预先感谢您提供的任何帮助。
丰富
My android application, built inside Eclipse, suddenly fails to build with dozens of errors. The most obvious are errors indicating that all the android imports cannot be resolved.
import android.os.Bundle; import android.app.Activity; import android.graphics.drawable.Drawable; import android.media.AudioManager; import android.util.Log; import android.view.Menu; import android.view.View; import android.widget.Button; import android.widget.ImageView;All of these are flagged as unresolvable. I've tried removing and re-adding the JRE System Library. I've tried cleaning and rebuilding. I've tried the "Quick fix" option to "Fix Project Setup..." but that simply responds with a dialog box that say...
"No proposals have been found to fix the unresolvable reference to 'android.app.Bundle'. Click here to manually configure the build path of project 'Silent Mode Toggle."
I'm new to Android development and this one has me completely stumped.
Thanks in advance for any help you can provide.
Rich
最满意答案
看起来你的eclipse-workspace (或者至少是你的Project )以某种方式被破坏了。
你最近移动了你的android-sdk/Project吗? 如果它不再是Android项目,请尝试查看Preferences->Android以获取有效的android sdk-location 。
如果这是正确的,请尝试打开一个完整的新工作区,然后使用File->import->Android Project从现有Source中导入源File->import->Android Project 。
如果这仍然没有帮助,请制作一个新的android Project并从Eclipse外部手动复制您的Project的源代码。 之后重新打开Eclipse,然后进行Project->clean
It seems that your eclipse-workspace (or at least your Project) is broken somehow.
Have you moved your android-sdk/Project recently? If it's not an Android Project anymore, try to look at Preferences->Android for a valid android sdk-location.
If this is correct, try to open a complete new Workspace, and import your sources with File->import->Android Project from existing Source.
If this still doesn't help, make a new android Project and copy the sources manually inside your Project from outside Eclipse. Re-open Eclipse after that, and make a Project->clean
更多推荐
发布评论