想打印内存堆栈日志   可以在制定的地方Log.i("a", "b", new RuntimeException());

解决方案 »

  1.   

    我是在c++模块里面做了中断。
    中断的地方调用jni,返回到java层,启动了一个线程去 从logcat拿信息。如下:
    public  void nativeCrashed()
    {
    Log.e("handller", "handller");  
            new RuntimeException("crashed here (native trace should follow after the Java trace)").printStackTrace();  
            
            startActivity(new Intent(this, CrashHandler.class));     
    }
      

  2.   

    这里我new 了一个RuntimeException. 打印出来的只有java层的 。。没有关于内存堆栈的信息。。