`
文章列表
out\target\common\obj\JAVA_LIBRARIES\framework_intermediates\classes.jar
第一种是UnsatisfiedlinkError:dll名称。说明dll没有放到合适的位置。对于Android开发,我们一般把so放在libs目录下,但是还是会出现这个错误。根本原因System.loadLibrary函数会加载你指定的so,该so中需要链接的所有符号都需要能够链接到,如果有一个链接不成功,那么整个so也会加载失败。仔细检查so中需要的所有符号,确保其存在且在正确的位置上。 第二种是UnsatisfiedlinkError:方法名称。说明dll已经成功加载,但是方法名字错了。这个错误最最常见而且基本的解决方法是:仔细对比你的native 方法的原型确保与javah生成的原型一致 ...

linux的一些常用命令

    博客分类:
  • os
1.查看系统所有进程 ps -e 2.杀掉进程: 根据ps -e显示出的进程id, 用命令kill id号即可 3.sudo su 平时不想老加sudo来执行一些命令,可以直接使用用户权限 4.chown 777 目录/文件 为文件改权限 先写这些,一点点补充,linux命令不用忘的很快,以此以记之

屏蔽home键

@Override public void onAttachedToWindow() { // TODO Auto-generated method stub super.onAttachedToWindow(); this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG); super.onAttachedToWindow(); }

intent home

Intent mHomeIntent = new Intent(Intent.ACTION_MAIN, null); mHomeIntent.addCategory(Intent.CATEGORY_HOME); mHomeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); startActivity(mHomeIntent);
public class ExampleAppWidgetProvider extends AppWidgetProvider {     public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {         final int N = appWidgetIds.length;         // Perform this loop procedure for each App Widget that belongs to this provider    ...
imageView = (ImageView) findViewById(R.id.imageView1); Matrix matrix = new Matrix(); matrix.postScale(0.5f, 0.5f); matrix.postTranslate(100, 20); matrix.postRotate(30); imageView.setImageMatrix(matrix); xml中要设置ImageView的属性为android:scaleType="matrix"
private ScrollView scrollViewGroup = null; Handler handler = new Handler(){ @Override public void handleMessage(Message msg) { super.handleMessage(msg); scrollViewGroup.scrollTo(0, 0); } }; // Scroll the scroll-view to top Message message = Message.obtain(); handler.send ...
1.When the scrolling is stop(idle) to invoke our operation listViewLocal.setOnScrollListener(new OnScrollListener() { @Override public void onScrollStateChanged(AbsListView view, int scrollState) { if (scrollState == OnScrollListener.SCROLL_STATE_IDLE) { if (view.getLastVisiblePositi ...

java date format

    博客分类:
  • java
Date data get from database, String ---> long --> Date() and get the final We want Date date = new Date(bean.createTime); new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date)

sqlite 分页

select * from table_name limit 10,100; 表示跳过10条,取100条结果。

重写dialog

<style name="actiondialog" parent="@android:style/Theme.Dialog"> <item name="android:windowFrame">@null</item> <item name="android:windowIsFloating">false</item> <item name="android:windowIsTranslucent">true&l ...
// Deal with big image that size more 8M BitmapFactory.Options option = new BitmapFactory.Options(); option.inTempStorage = new byte[1024*1024*5]; Bitmap bm = BitmapFactory.decodeFile(inputStream,cwj); // We can also compute sample
// Add this property into C:\Documents and Settings\Administrator\.android\avd\480_800.avd/config.ini hw.ramSize=256
/// how to scroll to a position in a listView int index = mList.getFirstVisiblePosition(); View v = mList.getChildAt(0); int top = (v == null) ? 0 : v.getTop(); // ... // restore mList.setSelectionFromTop(index, top);
Global site tag (gtag.js) - Google Analytics