您的位置:首页 > 编程语言 > Java开发

Android & Eclipse FAQ

2014-02-25 17:22 253 查看
一、eclipse中格式化代码快捷键Ctrl+Shift+F失效的解决办法

当我要格式化代码的时候,右键-source-format能够起效,但ctrl+shift+f不好使了。

google之后来发现是搜狗输入法惹的祸。原来是和“简繁体快捷键”冲突了。输入法中的这个快捷键我们一般不用,小勾勾去掉就成了。

一、运行eclipse执行android应用,控制台报错:

The connection to adb is down, and a severe error has occured.

You must restart adb and Eclipse.

Please ensure that adb is correctly located at 'E:\setups\android\android-2.1_r01-windows\tools\adb.exe' and can be executed.

解决办法:查看任务管理器,关闭所有tadb进程,然后重启eclipse

abd命令

adb kill-server

adb start-server

一、warning:Avoid hardcoding the debug mode; leaving it out allows debug and release builds to automatically assign one

answer:I removed the debuggable attribute from the manifest, and I can now both run the app in debug mode and export it to a market-ready APK file without changing any code.

Slick!

Full explanation here http://stackoverflow.com/a/4580630/682754
64位Eclipse运行时提示“Failed to load the JNI shared library \Java\jre6\bin\client

\jvm.dll”的一个解决方案

如何查看异常的代码位置?

要查看异常代码的位置需要使用Exception.printStackTrace().把异常的相关信息打印出来。

如果应用没有相应的权限,会source not found

导入的jar包,如果没有在Build Path->configure build path..->order and export选线卡中

,勾选的话,会报错source not found

eclipse更改xml文件,txt文件,property文件等文件编辑器的字体设置:

window--preferences--General--appearance--colors and fonts--Basic-- "Text font "
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: