01 2015 档案
摘要:原理是使用反射的机制java中反射的例子:Class forName = Class.forName("com.example.ndkcallback.DataProvider"); //找到类Method declaredMethod = forName.getDeclaredMethod("he...
阅读全文
摘要:1. 在类里面申明 public native xxx(); 函数接口2. 在安卓工程src目录下 使用命令 javah 包名.类名 生成该类所申明的c语言接口
阅读全文
摘要:#include #define LOG_TAG "clog"#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)#define LOGI(...) __android_log_print(AND...
阅读全文
摘要:1.java String转换 C strchar* Jstring2CStr(JNIEnv* env, jstring jstr){ char* rtn = NULL; jclass clsstring = (*env)->FindClass...
阅读全文
摘要:1 2 3 4 #FFFFFF 5 6 #FFFFF0 7 8 #FFFFE0 9 10 #FFFF00 11 12 #FFFAFA 13 14 #FFFAF0 15 ...
阅读全文
摘要:1 #!/bin/bash 2 3 if [[ ! -n $1 ]]; then 4 cat 6 EOF 7 exit 1 8 fi11 12 package_name=$113 ip=110.1.1.19:555514 pid_...
阅读全文
摘要:自定义控件FocusedTextView, 使android系统误以为它拥有焦点 1 public class FocusedTextView extends TextView { 2 public FocusedTextView(Context context, AttributeSet ...
阅读全文
摘要:每次用Eclipse自带的Ctrl+shift+f格式化代码时,如果原来的一行代码大于80列,Eclipse就会自动换为多行,这点个人感觉不是很舒服,简单试了一下,通过以下方式可以修改1、preferences->Java->Code Style->Code Formatter->Show... ,...
阅读全文
摘要:public class Debug { public static int line(Exception e) { StackTraceElement[] trace = e.getStackTrace(); if (trace == null || trace.length == 0) ...
阅读全文
摘要:如题,manifest加上 1 2 3 4 5 6 7 8 ...
阅读全文

浙公网安备 33010602011771号