posted @ 2012-12-13 15:26
随笔分类 - Java/Android
摘要:项目需要做android jni的东西,初次学习,现将学习的结果记录总结如下:C++中的char数组转为Jstring:jstring stoJstring(JNIEnv* env, const char* pat){ int strLen = strlen(pat); jclass jstrObj = (env)->FindClass("java/lang/String"); jmethodID methodId = (env)->GetMethodID(jstrObj, "<init>", "([BLjava/l..
阅读全文
摘要:转自http://www.cnblogs.com/over140/archive/2011/11/21/2256727.html
阅读全文
posted @ 2012-12-13 15:01
摘要:Android 搜索文件: private String searchFile(String keyword){ String result = ""; File[] files = new File("/").listFiles(); for(File f: files) { if(f.getName().indexOf(keyword) >= 0) { result+=f.getPath() + "\n"; } } return result;}
阅读全文
posted @ 2012-05-12 17:15
摘要:#######################################...........#具体要编译的东西的在Android.mk里面的设置,此例忽略#...........######################################## targetinclude $(CLEAR_VARS)LOCAL_SRC_FILES += $(local_src_files)LOCAL_CFLAGS += $(local_c_flags) -DANDROID_FROYOLOCAL_C_INCLUDES += $(local_c_includes)LOCAL_MODULE:=
阅读全文
posted @ 2012-05-11 16:35
摘要:sh = Runtime.getRuntime().exec("su"); OutputStream os = sh.getOutputStream(); os.write("xxxx\n".getBytes("ASCII"));使用root权限,执行shell命令(如上面举例的xxxx)。
阅读全文
posted @ 2012-05-10 22:05
摘要:安装白板软件前,请先进行JDK的配置,操作如下:******************** JDK配置说明 **************************************************************************************** ** jdk-6u22-linux-i586.bin 为JDK文件名称 ** jdk1.6.0_22 为JDK解压出来的文件名称 ** kaka ...
阅读全文
posted @ 2012-05-08 10:43
摘要:最近因为工作需要,需要完整的Android源码,于是在VMware上安装Ubuntu,按照http://source.android.com/source/downloading.html中说明下载源码,但是当使用命令repo syns的时候总是失败DownloadError: android.googlesource.com: <urlopen error [Errno 110] Connection timed out>其实官网(http://source.android.com/source/downloading.html)有段说明,如果认真执行就可解决。1, 先按官网的步
阅读全文
posted @ 2012-05-04 15:12
浙公网安备 33010602011771号