摘要:传统方式调试 NDK 开发的程序比较麻烦,先要编译成 JNI,又要导出 java接口,还要再写一个 java 工程,改一个地方又要连续改几处,这样效率是很低的。最频繁使用的关键工作路径(编译/调试环节)如果能极致简化,那么可以带来开发效率的成倍提升。其实安卓官方是提供了命令行调试方法的,将你需要调试的 C代码用 NDK直接编译成可执行,然后到设备上执行: 使用 NDK 导出独立工具链,方便以后使...
阅读全文
摘要:LayoutInflater作用是将layout的xml布局文件实例化为View类对象。 获取LayoutInflater的方法有如下三种: ? LayoutInflater inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View layout = inflater.i...
阅读全文
摘要:Table of Contents 1. Solving typical Android development problems1.1. Clean Project 1.2. android.content.ActivityNotFoundException 1.3. Problems with Android Debug Bridge (adb) 1.4. LogCat 1.5. Java7 ...
阅读全文
摘要:http://www.vogella.com/tutorials/AndroidEclipseTooling/article.html
阅读全文
摘要:http://www.vogella.com/tutorials/AndroidLibraryProjects/article.html 介绍support lib使用 http://developer.android.com/tools/support-library/setup.html Adding libraries without resources ...
阅读全文
摘要:Eclipse中导入外部jar包 在编写java代码时,为方便编程,常常会引用别人已经实现的方法,通常会封装成jar包,我们在编写时,只需引入到Eclipse中即可。 工具/原料 Eclipse 需要引入的jar包 方法/步骤 1 首先在项目下创建一个文件夹,保存我们的jar包。 在项目名上右击,依次点击【...
阅读全文
摘要:File ->New Android Project 选择Create project from existing sample (不同Android版本有对应的ApiDemo示例)。
阅读全文
摘要:Eclipse for android 实现代码自动提示智能提示功能,介绍 Eclipse for android 编辑器中实现两种主要文件 java 与 xml 代码自动提示功能,解决 eclipse 代码提示失效、eclipse 不能自动提示、eclipse 没有代码提示的问题。eclipse xml 自动提示,eclipse java 自动提示,eclipse 自动提示功能,eclipse ...
阅读全文
摘要:ubuntu 14.04 64位 环境 参考 Cupcake (1.5) Donut (1.6) Eclair (2.0–2.1) Froyo (2.2–2.2.3) Gingerbread (2.3–2.3.7) Honeycomb (3.0–3.2.6) Ice Cream Sandwich (4.0–4.0.4) Jelly Bea...
阅读全文
摘要:http://blog.chinaunix.net/uid-26009923-id-4068594.html
阅读全文
摘要:http://www.devbean.net/2011/11/qtcreator-plugin-develop-13/
阅读全文
摘要:3.2.7 错误处理 #include char * collect_data(char *userbuffer) { char *buffer; /* ... */ buffer = kmalloc(100, GFP_KERNEL); if (!buf...
阅读全文
摘要:在Makefile中写shell代码有点诡异,和不同的shell语法不太一样,如果不了解,看Makefile会莫名其妙。下面总结了一些。 1:尽在Makefile文件的目标项冒号后的另起一行的代码才是shell代码。 eg: xx = xx1 // 这里时makefile代码 yy:xx = xx2 // 这是是makefile代码,makefil...
阅读全文
摘要:Ping doesn't work Ping from U-Boot to a host should work. Ping from a host to U-Boot should not. U-Boot uses a polling interface for networking - if you have not run a command, it will not respond t...
阅读全文