我从以下位置下载了富文本编辑器的源代码:
http://code.google.com/p/android-richtexteditor/
并且代码将无法正确编译。我得到的错误是:
"Unable to resolve target 'android-4'",
"AndroidManifest.xml file missing!", and in the Html.java file there are 2 errors involving;
"The import org.ccil cannot be resolved"
当您下载文件时,您需要下载第 4 版的源代码,因为最新版本的源代码已被删除。我正在使用 eclipse 版本 4.2.0,Android SDK Manager 修订版 20。我已经安装了 API 版本 4.0、4.1 和许多附加功能。我很确定我下载了 Eclipse 的“经典”版本。我怀疑这些错误有两个原因,希望能提供意见。关于这个项目和一般错误的其他线程都没有帮助,因为至少有一个线程排名最高的答案实际上是不正确的。此外,所提供的说明不适用于我的 eclipse 版本,或者不完整。
最佳答案
"Unable to resolve target 'android-4'"
项目设置为针对 API 级别 4 (Android 1.6) 构建,而您的开发机器上没有该 SDK。
"AndroidManifest.xml file missing!"
这应该是不言自明的。
"The import org.ccil cannot be resolved"
这表明缺少类,或者可能是代码重构不完整。
考虑到这段代码已经两年多没有维护了,我建议您考虑一些更现代的东西。例如,我正在研究 a RichEditText
widget担任相同的角色。
关于android - 如何让Android富文本编辑器正确编译?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13534367/