简体   繁体   English

咦? 添加SDK 1.6后,Android“偏好设置”页面拒绝加载

[英]Huh? Android Preferences page refuses to load after adding SDK 1.6

This one is really weird. 这真的很奇怪。 I had a perfectly working Eclipse + Android 2.2 SDK working in both Administrator account and LUA (Limited User Account) under Windows XP. 我在Windows XP下的管理员帐户 LUA(受限用户帐户)中都可以正常工作的Eclipse + Android 2.2 SDK。

Then I decided to add the Android 1.6 SDK (I could do it from an Administrator account only). 然后,我决定添加Android 1.6 SDK(我只能通过管理员帐户来执行此操作)。 It seemed to have gone well, since it still works perfectly -- but only in that Administrator account! 它似乎运行良好,因为它仍然可以完美运行-但仅在该Administrator帐户中!

When I try to start Eclipse under a LUA, I receive the following error message box: 当我尝试在LUA下启动Eclipse时,收到以下错误消息框:

替代文字

Which disappears within 2-3 seconds and replaced with: 在2-3秒内消失,并替换为:

替代文字

I then tried to check the Preferences page, but again, all I receive is error messages: 然后,我尝试检查“首选项”页面,但同样,我收到的只是错误消息:

替代文字

and: 和:

替代文字

Any idea why this is happening and how to fix this? 知道为什么会这样以及如何解决吗?

(I would love to be able to continue working from a LUA) (我希望能够从LUA继续工作)

Update : I have uploaded the error log file (referred to in the "Show Error Log" in the message boxes), for your expert examination. 更新 :我已经上传了错误日志文件 (在消息框中的“显示错误日志”中进行了引用),供您进行专家检查。 Hopefully this can shed some light on the mystery. 希望这可以为我们揭开谜底。

The full answer is somewhat complex, concerning Eclipse's configuration area, the workspace area, etc. This is all documented on the Eclipse site, if you're interested. 完整的答案有些复杂,涉及Eclipse的配置区域,工作空间区域等。如果您有兴趣,这些全部记录在Eclipse站点上。

But there's a simpler, more immediate approach, since you're not trying to run multiple users simultaneously on the same copy, over a network -- in which case you'd need the full answer. 但是有一种更简单,更直接的方法,因为您不打算通过网络在同一副本上同时运行多个用户-在这种情况下,您将需要完整的答案。

Simply install Eclipse in a directory, say, C:/dev/Eclipse. 只需在目录C:/ dev / Eclipse中安装Eclipse。 Make sure both your limited user and your admin have write access to everything. 确保您的受限用户和管理员都具有对所有内容的写权限。 Run Eclipse as the limited user. 以受限用户身份运行Eclipse。 It should start right up, as there's nothing privileged that is needed by Eclipse. 它应该立即启动,因为Eclipse不需要任何特权。

At this point, you can lock it down as read-only if you desire. 此时,您可以根据需要将其锁定为只读。 By default, all the configuration is stored within the Eclipse installation directory. 默认情况下,所有配置都存储在Eclipse安装目录中。

I'd suggest starting with a fresh install at this point, to eliminate any inconsistencies that you may have introduced. 我建议此时从全新安装开始,以消除您可能引入的任何不一致之处。 Though you should be able to reset things by deleting all the subdirectories of the configure/ directory (but not the config.ini). 虽然您应该能够通过删除configure /目录的所有子目录(而不是config.ini)来重置事物。 There's an official way to do that, but that's part of the full answer. 有一种官方的方法可以做到这一点,但这是完整答案的一部分。 :=) :=)

I'd also suggest using a different workspace for each user, to avoid any permissions problems. 我还建议为每个用户使用不同的工作区,以避免任何权限问题。

But my BIG suggestion is -- upgrade to Windows 7, and do NOT run Eclipse as an administrator! 但是我的大建议是-升级到Windows 7,不要以管理员身份运行Eclipse!

Anyway, once you have it working -- to upgrade in the future, make the Eclipse directory completely writable by the limited user, and then update as the limited user, and then make it read-only again if needed. 无论如何,一旦您可以使用它-将来要进行升级,请使Eclipse目录完全可由受限用户写入,然后以受限用户身份进行更新,然后根据需要将其再次设置为只读。

Note: This is the cheating way. 注意:这是作弊方法。 The REAL answer is to give each user their own configuration directory. 真正的答案是给每个用户自己的配置目录。 This is only viable because you have control over both users and can coordinate any updates. 这仅可行,因为您可以控制两个用户并且可以协调任何更新。

Try running eclipse by downloading the binary and unzipping and directly running the .exe rather than "installing" it. 尝试通过下载二进制文件并解压缩并直接运行.exe而不是“安装”它来运行eclipse。 The android tools should work this way if you configure the appropriate paths to them, and if eclipse isn't "installed" but simply run from a the archive folder, it should try to download plugins and such into its own directory (owned by your user), which may solve your problem. 如果您配置了相应的路径,则android工具应以这种方式工作,并且如果未“安装” eclipse,而是仅从存档文件夹运行,则应尝试将插件等下载到其自己的目录(由您拥有)用户),这可能会解决您的问题。

I doubt the Android developers who built the tools run under LUAs, so they probably didn't run into this problem... 我怀疑构建工具的Android开发人员会在LUA下运行,因此他们可能没有遇到这个问题...

Workaround found: Run Eclipse as Administrator (Right-click exe/shortcut, then select " Run as... ", then enter Administrator's password). 找到解决方法:以管理员身份运行Eclipse(右键单击exe /快捷方式,然后选择“ 运行方式... ”,然后输入管理员的密码)。

This is a workaround, not a solution, but it does allow me to continue working while logged in LUA . 这是一种解决方法,而不是解决方案,但是它确实允许我在登录LUA时继续工作。

Thanks to @David who suggested this solution here: Android ADT Plugin doesn't show up in Eclipse 感谢@David在这里建议此解决方案: Android ADT插件未在Eclipse中显示

Update: Solution found: 更新:找到解决方案:

  1. Enable the Security tab in Windows XP Pro (""Use Simple File Sharing.") 在Windows XP Pro中启用“安全性”选项卡(“使用简单文件共享”。)
  2. Add the LUA account to C:\\eclipse with Modify permissions. 使用“ 修改”权限将LUA帐户添加到C:\\ eclipse。

That's it. 而已。 No need to run Eclipse via "Run as". 无需通过“运行方式”运行Eclipse。 Also eliminates the need for a fresh install (which takes more time). 还消除了全新安装的需要(这需要更多时间)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM