首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    Android Bitmap 内存溢出的问题

    09-29 13:35:41.884: E/SQLiteLog(20098): (10) Failed to do file read, got: 0, amt: 100, last Errno: 2 09-29 13:35:46.857: E/dalvikvm-heap(20098): Out of memory on a 31360016-byte allocation. 09-29 13:35:46.862: E/AndroidRuntime(20098): FATAL EXCEPTION: main 09-29 13:35:46.862: E/AndroidRuntime(20098): Process: com.example.nongmin, PID: 20098 09-29 13:35:46.862: E/AndroidRuntime(20098): java.lang.OutOfMemoryError 09-29 13:35:46.862: E/AndroidRuntime(20098): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 09-29 13:35:46.862: E/AndroidRuntime(20098): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:616) 09-29 13:35:46.862: E/AndroidRuntime(20098): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:451) 09-29 13:35:46.862: E/AndroidRuntime(20098): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:840) 09-29 13:35:46.862: E/AndroidRuntime(20098): at android.content.res.Resources.loadDrawable(Resources.java:2235) 09-29 13:35:46.862: E/AndroidRuntime(20098): at android.content.res.Resources.getDrawable(Resources.java:722) 09-29 13:35:46.862: E/AndroidRuntime(20098): at com.jarvis.message.ChatMain.onCreate(ChatMain.java:121) 09-29 13:35:46.862: E/AndroidRuntime(20098): at android.app.Activity.performCreate(Activity.java:5451) 09-29 13:35:46.862: E/AndroidRuntime(20098): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097) 09-29 13:35:46.862: E/AndroidRuntime(20098): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2346) 09-29 13:35:46.862: E/AndroidRuntime(20098): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2443) 09-29 13:35:46.862: E/AndroidRuntime(20098): at android.app.ActivityThread.access$800(ActivityThread.java:157) 09-29 13:35:46.862: E/AndroidRuntime(20098): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354) 09-29 13:35:46.862: E/AndroidRuntime(20098): at android.os.Handler.dispatchMessage(H

    03

    android学习各种bug(5)

    09-26 01:20:33.336: E/AndroidRuntime(1854): FATAL EXCEPTION: main 09-26 01:20:33.336: E/AndroidRuntime(1854): Process: com.example.nongmin, PID: 1854 09-26 01:20:33.336: E/AndroidRuntime(1854): java.lang.ClassCastException: android.widget.ImageView cannot be cast to android.widget.TextView 09-26 01:20:33.336: E/AndroidRuntime(1854): at com.jarvis.mytaobao.user.User_F.initView(User_F.java:77) 09-26 01:20:33.336: E/AndroidRuntime(1854): at com.jarvis.mytaobao.user.User_F.onCreateView(User_F.java:67) 09-26 01:20:33.336: E/AndroidRuntime(1854): at android.support.v4.app.Fragment.performCreateView(Fragment.java:1789) 09-26 01:20:33.336: E/AndroidRuntime(1854): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:955) 09-26 01:20:33.336: E/AndroidRuntime(1854): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1138) 09-26 01:20:33.336: E/AndroidRuntime(1854): at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:740) 09-26 01:20:33.336: E/AndroidRuntime(1854): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1501) 09-26 01:20:33.336: E/AndroidRuntime(1854): at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:458) 09-26 01:20:33.336: E/AndroidRuntime(1854): at android.os.Handler.handleCallback(Handler.java:733) 09-26 01:20:33.336: E/AndroidRuntime(1854): at android.os.Handler.dispatchMessage(Handler.java:95) 09-26 01:20:33.336: E/AndroidRuntime(1854): at android.os.Looper.loop(Looper.java:136) 09-26 01:20:33.336: E/AndroidRuntime(1854): at android.app.ActivityThread.main(ActivityThread.java:5017) 09-26 01:20:33.336: E/AndroidRuntime(1854): at java.lang.reflect.Method.invokeNative(Native Method) 09-26 01:20:33.336: E/AndroidRuntime(1854): at java.lang.reflect.Method.invoke(Method.java:515) 09-26 01:20:33.336: E/AndroidRuntime(1854): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 09-26 01:20:33.336: E/AndroidRuntime(185

    03

    Android调试的各种bug

    09-20 17:55:38.457: E/AndroidRuntime(14963): FATAL EXCEPTION: main 09-20 17:55:38.457: E/AndroidRuntime(14963): Process: com.clockrock.freeshare, PID: 14963 09-20 17:55:38.457: E/AndroidRuntime(14963): java.lang.NoSuchMethodError: com.clockrock.tieba.WritePostActivity.getDrawable 09-20 17:55:38.457: E/AndroidRuntime(14963): at com.clockrock.tieba.WritePostActivity.onCreate(WritePostActivity.java:236) 09-20 17:55:38.457: E/AndroidRuntime(14963): at android.app.Activity.performCreate(Activity.java:5451) 09-20 17:55:38.457: E/AndroidRuntime(14963): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097) 09-20 17:55:38.457: E/AndroidRuntime(14963): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2346) 09-20 17:55:38.457: E/AndroidRuntime(14963): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2443) 09-20 17:55:38.457: E/AndroidRuntime(14963): at android.app.ActivityThread.access$800(ActivityThread.java:157) 09-20 17:55:38.457: E/AndroidRuntime(14963): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354) 09-20 17:55:38.457: E/AndroidRuntime(14963): at android.os.Handler.dispatchMessage(Handler.java:110) 09-20 17:55:38.457: E/AndroidRuntime(14963): at android.os.Looper.loop(Looper.java:193) 09-20 17:55:38.457: E/AndroidRuntime(14963): at android.app.ActivityThread.main(ActivityThread.java:5348) 09-20 17:55:38.457: E/AndroidRuntime(14963): at java.lang.reflect.Method.invokeNative(Native Method) 09-20 17:55:38.457: E/AndroidRuntime(14963): at java.lang.reflect.Method.invoke(Method.java:515) 09-20 17:55:38.457: E/AndroidRuntime(14963): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829) 09-20 17:55:38.457: E/AndroidRuntime(14963): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645) 09-20 17:55:38.457: E/AndroidRuntime(14963): at dalvik.system.NativeStart.main(Native Method) 错误原因:actionbar导致的问题,theme用了自定义的方法, 09-21 20:47:27.169: V/ActivityThread(1

    03

    mView has no focus+DecorView setVisiblity: visibility = 4+Finishing stop of ActivityRecord

    09-24 18:22:23.692: E/AndroidRuntime(22703): FATAL EXCEPTION: main 09-24 18:22:23.692: E/AndroidRuntime(22703): Process: com.example.nongmin, PID: 22703 09-24 18:22:23.692: E/AndroidRuntime(22703): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.nongmin/com.jarvis.user.info.UApplyedActivity}: android.view.InflateException: Binary XML file line #17: Error inflating class com.clockrock.widget.PullToRefreshLayout 09-24 18:22:23.692: E/AndroidRuntime(22703): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2392) 09-24 18:22:23.692: E/AndroidRuntime(22703): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2443) 09-24 18:22:23.692: E/AndroidRuntime(22703): at android.app.ActivityThread.access$800(ActivityThread.java:157) 09-24 18:22:23.692: E/AndroidRuntime(22703): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354) 09-24 18:22:23.692: E/AndroidRuntime(22703): at android.os.Handler.dispatchMessage(Handler.java:110) 09-24 18:22:23.692: E/AndroidRuntime(22703): at android.os.Looper.loop(Looper.java:193) 09-24 18:22:23.692: E/AndroidRuntime(22703): at android.app.ActivityThread.main(ActivityThread.java:5348) 09-24 18:22:23.692: E/AndroidRuntime(22703): at java.lang.reflect.Method.invokeNative(Native Method) 09-24 18:22:23.692: E/AndroidRuntime(22703): at java.lang.reflect.Method.invoke(Method.java:515) 09-24 18:22:23.692: E/AndroidRuntime(22703): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829) 09-24 18:22:23.692: E/AndroidRuntime(22703): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645) 09-24 18:22:23.692: E/AndroidRuntime(22703): at dalvik.system.NativeStart.main(Native Method) 09-24 18:22:23.692: E/AndroidRuntime(22703): Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class com.clockrock.widget.PullToRefreshLayout 09-24 18:22:23.692: E/AndroidRuntime(22703): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java

    02

    “did not call through to super.onResume”问题解决「建议收藏」

    12-23 22:47:26.720: W/dalvikvm(3864): threadid=1: thread exiting with uncaught exception (group=0x410af9d8) 12-23 22:47:26.720: E/AndroidRuntime(3864): FATAL EXCEPTION: main 12-23 22:47:26.720: E/AndroidRuntime(3864): java.lang.RuntimeException: Unable to resume activity {com.project.app/com.ui.activity.MainSFA}: android.app.SuperNotCalledException: Activity {com.project.app/com.ui.activity.MainSFA} did not call through to super.onResume() 12-23 22:47:26.720: E/AndroidRuntime(3864): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2457) 12-23 22:47:26.720: E/AndroidRuntime(3864): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2485) 12-23 22:47:26.720: E/AndroidRuntime(3864): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1999) 12-23 22:47:26.720: E/AndroidRuntime(3864): at android.app.ActivityThread.access600(ActivityThread.java:126) 12-23 22:47:26.720: E/AndroidRuntime(3864): at android.app.ActivityThreadH.handleMessage(ActivityThread.java:1150) 12-23 22:47:26.720: E/AndroidRuntime(3864): at android.os.Handler.dispatchMessage(Handler.java:99) 12-23 22:47:26.720: E/AndroidRuntime(3864): at android.os.Looper.loop(Looper.java:137) 12-23 22:47:26.720: E/AndroidRuntime(3864): at android.app.ActivityThread.main(ActivityThread.java:4439)

    02

    解决异常Circular dependencies cannot exist in RelativeLayout

    今天碰到这个error:E/AndroidRuntime( 4657): Uncaught handler: thread main exiting due to uncaught e xception E/AndroidRuntime( 4657): java.lang.IllegalStateException: Circular dependencies cannot exist in RelativeLayout 有点郁闷,我用的是skd1.5,在1.5的机器上(HTC G3)已经测试过了,没有问题的,但放在华为c8500(2.1update)上就报上面的错了,怎么回事呢? 根据提示判断应该是布局的原因,于是找到RelativeLayout的布局,找出最可疑的那个,注释后,不报错了。好就是他的原因,挨个看里面的元素,看属性,没错啊,后来发现, <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true"> <TextView android:id="@+id/titleName" android:text="首页" android:textColor="@color/white" android:layout_toLeftOf="@+id/homeBtn" android:layout_marginRight="2px" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView> <ImageButton android:id="@+id/homeBtn" android:layout_toRightOf="@+id/titleName" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/main" android:background="@null" android:layout_marginRight="10px"> </ImageButton> </RelativeLayout> 后来改成: <RelativeLayout android:layout_width="wrap_content" android:layout_marginRight="10px" android:layout_height="wrap_content" android:layout_alignParentRight="true"> <TextView android:id="@+id/titleName" android:text="首页" android:textColor="@color/white" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView> <ImageButton android:id="@+id/homeBtn" android:layout_marginLeft="2px" android:layout_marginTop="2px" android:layout_toRightOf="@+id/titleName" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/main" android:background="@null" > </ImageButton> </RelativeLayout> 能看到区别吗?对就是在titleName中去掉了相对homeBtn的位置信息。再看看报错提示,人家说我在RelativeLayout中存在循环的相关,就是说的这个了。 不过1.5版本的不报错,这就是后续版本的改进吗?

    02
    领券