我正在尝试实现像这样理想的东西,但由于不支持多重继承,
MyClass ABC extends ListActivity,YouTubeFailureRecoveryActivity{
}
我现在正在使用
MyClass ABC extends YouTubeFailureRecoveryActivity{
}
使用this之类的东西实现listView 但它不起作用,该应用程序在2.3上运行良好,但有时在4.1
崩溃该应用程序在4.1中崩溃
convertView = layoutInflator.inflate(R.layout.episode_list, null);
界面是唯一的解决方案还是还有其他任何事情可以做?
logcat的
12-17 11:38:38.638: I/dalvikvm(31274): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
12-17 11:38:38.643: I/dalvikvm(31274): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:636)
12-17 11:38:38.643: I/dalvikvm(31274): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:484)
12-17 11:38:38.643: I/dalvikvm(31274): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:813)
12-17 11:38:38.643: I/dalvikvm(31274): at android.content.res.Resources.loadDrawable(Resources.java:2277)
12-17 11:38:38.643: I/dalvikvm(31274): at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
12-17 11:38:38.643: I/dalvikvm(31274): at android.view.View.<init>(View.java:3463)
12-17 11:38:38.643: I/dalvikvm(31274): at android.view.View.<init>(View.java:3396)
12-17 11:38:38.643: I/dalvikvm(31274): at android.view.ViewGroup.<init>(ViewGroup.java:426)
12-17 11:38:38.658: I/dalvikvm(31274): at android.widget.RelativeLayout.<init>(RelativeLayout.java:184)
12-17 11:38:38.658: I/dalvikvm(31274): at java.lang.reflect.Constructor.constructNative(Native Method)
12-17 11:38:38.658: I/dalvikvm(31274): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
12-17 11:38:38.668: I/dalvikvm(31274): at android.view.LayoutInflater.createView(LayoutInflater.java:593)
12-17 11:38:38.693: I/dalvikvm(31274): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
12-17 11:38:38.693: I/dalvikvm(31274): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:666)
12-17 11:38:38.693: I/dalvikvm(31274): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691)
12-17 11:38:38.693: I/dalvikvm(31274): at android.view.LayoutInflater.rInflate(LayoutInflater.java:752)
12-17 11:38:38.693: I/dalvikvm(31274): at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
12-17 11:38:38.693: I/dalvikvm(31274): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
12-17 11:38:38.693: I/dalvikvm(31274): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
12-17 11:38:38.698: I/dalvikvm(31274): at com.fictionadda.android.PlayMedia$CustomAdapter.getView(PlayMedia.java:779)
12-17 11:38:38.708: I/dalvikvm(31274): at android.widget.HeaderViewListAdapter.getView(HeaderViewListAdapter.java:220)
12-17 11:38:38.708: I/dalvikvm(31274): at android.widget.AbsListView.obtainView(AbsListView.java:2472)
12-17 11:38:38.708: I/dalvikvm(31274): at android.widget.ListView.makeAndAddView(ListView.java:1775)
12-17 11:38:38.708: I/dalvikvm(31274): at android.widget.ListView.fillDown(ListView.java:678)
12-17 11:38:38.708: I/dalvikvm(31274): at android.widget.ListView.fillFromTop(ListView.java:739)
12-17 11:38:38.708: I/dalvikvm(31274): at android.widget.ListView.layoutChildren(ListView.java:1628)
12-17 11:38:38.708: I/dalvikvm(31274): at android.widget.AbsListView.onLayout(AbsListView.java:2307)
12-17 11:38:38.708: I/dalvikvm(31274): at android.view.View.layout(View.java:14107)
12-17 11:38:38.708: I/dalvikvm(31274): at android.view.ViewGroup.layout(ViewGroup.java:4657)
12-17 11:38:38.708: I/dalvikvm(31274): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1655)
12-17 11:38:38.708: I/dalvikvm(31274): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1513)
12-17 11:38:38.708: I/dalvikvm(31274): at android.widget.LinearLayout.onLayout(LinearLayout.java:1426)
12-17 11:38:38.708: I/dalvikvm(31274): at android.view.View.layout(View.java:14107)
12-17 11:38:38.708: I/dalvikvm(31274): at android.view.ViewGroup.layout(ViewGroup.java:4657)
12-17 11:38:38.713: I/dalvikvm(31274): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
12-17 11:38:38.718: I/dalvikvm(31274): at android.widget.ScrollView.onLayout(ScrollView.java:1718)
12-17 11:38:38.718: I/dalvikvm(31274): at android.view.View.layout(View.java:14107)
12-17 11:38:38.718: I/dalvikvm(31274): at android.view.ViewGroup.layout(ViewGroup.java:4657)
12-17 11:38:38.718: I/dalvikvm(31274): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1655)
12-17 11:38:38.718: I/dalvikvm(31274): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1513)
12-17 11:38:38.718: I/dalvikvm(31274): at android.widget.LinearLayout.onLayout(LinearLayout.java:1426)
12-17 11:38:38.718: I/dalvikvm(31274): at android.view.View.layout(View.java:14107)
12-17 11:38:38.718: I/dalvikvm(31274): at android.view.ViewGroup.layout(ViewGroup.java:4657)
12-17 11:38:38.718: I/dalvikvm(31274): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1655)
12-17 11:38:38.718: I/dalvikvm(31274): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1513)
12-17 11:38:38.718: I/dalvikvm(31274): at android.widget.LinearLayout.onLayout(LinearLayout.java:1426)
12-17 11:38:38.718: I/dalvikvm(31274): at android.view.View.layout(View.java:14107)
12-17 11:38:38.718: I/dalvikvm(31274): at android.view.ViewGroup.layout(ViewGroup.java:4657)
12-17 11:38:38.718: I/dalvikvm(31274): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1655)
12-17 11:38:38.718: I/dalvikvm(31274): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1513)
12-17 11:38:38.718: I/dalvikvm(31274): at android.widget.LinearLayout.onLayout(LinearLayout.java:1426)
12-17 11:38:38.718: I/dalvikvm(31274): at android.view.View.layout(View.java:14107)
12-17 11:38:38.718: I/dalvikvm(31274): at android.view.ViewGroup.layout(ViewGroup.java:4657)
12-17 11:38:38.723: I/dalvikvm(31274): at android.widget.RelativeLayout.onLayout(RelativeLayout.java:948)
12-17 11:38:38.723: I/dalvikvm(31274): at android.view.View.layout(View.java:14107)
12-17 11:38:38.723: I/dalvikvm(31274): at android.view.ViewGroup.layout(ViewGroup.java:4657)
12-17 11:38:38.723: I/dalvikvm(31274): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
12-17 11:38:38.723: I/dalvikvm(31274): at android.view.View.layout(View.java:14107)
12-17 11:38:38.723: I/dalvikvm(31274): at android.view.ViewGroup.layout(ViewGroup.java:4657)
12-17 11:38:38.723: I/dalvikvm(31274): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1655)
12-17 11:38:38.723: I/dalvikvm(31274): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1513)
12-17 11:38:38.723: I/dalvikvm(31274): at android.widget.LinearLayout.onLayout(LinearLayout.java:1426)
12-17 11:38:38.723: I/dalvikvm(31274): at android.view.View.layout(View.java:14107)
12-17 11:38:38.723: I/dalvikvm(31274): at android.view.ViewGroup.layout(ViewGroup.java:4657)
12-17 11:38:38.723: I/dalvikvm(31274): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
12-17 11:38:38.723: I/dalvikvm(31274): at android.view.View.layout(View.java:14107)
12-17 11:38:38.723: I/dalvikvm(31274): at android.view.ViewGroup.layout(ViewGroup.java:4657)
12-17 11:38:38.723: I/dalvikvm(31274): at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2005)
12-17 11:38:38.723: I/dalvikvm(31274): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1826)
12-17 11:38:38.723: I/dalvikvm(31274): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1121)
12-17 11:38:38.723: I/dalvikvm(31274): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4598)
12-17 11:38:38.723: I/dalvikvm(31274): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
12-17 11:38:38.723: I/dalvikvm(31274): at android.view.Choreographer.doCallbacks(Choreographer.java:555)
12-17 11:38:38.723: I/dalvikvm(31274): at android.view.Choreographer.doFrame(Choreographer.java:525)
12-17 11:38:38.723: I/dalvikvm(31274): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
12-17 11:38:38.723: I/dalvikvm(31274): at android.os.Handler.handleCallback(Handler.java:615)
12-17 11:38:38.723: I/dalvikvm(31274): at android.os.Handler.dispatchMessage(Handler.java:92)
12-17 11:38:38.723: I/dalvikvm(31274): at android.os.Looper.loop(Looper.java:137)
12-17 11:38:38.723: I/dalvikvm(31274): at android.app.ActivityThread.main(ActivityThread.java:4921)
12-17 11:38:38.723: I/dalvikvm(31274): at java.lang.reflect.Method.invokeNative(Native Method)
12-17 11:38:38.723: I/dalvikvm(31274): at java.lang.reflect.Method.invoke(Method.java:511)
12-17 11:38:38.723: I/dalvikvm(31274): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
12-17 11:38:38.723: I/dalvikvm(31274): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
12-17 11:38:38.723: I/dalvikvm(31274): at dalvik.system.NativeStart.main(Native Method)
答案 0 :(得分:0)
在Manifest
文件中进行了以下更改,它确实有用!!!!!
android:largeHeap="true"
在<application>
标记