开发者

When running the app in Tab error is coming [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.
09-15 12:58:52.038: ERROR/dalvikvm-heap(26900): 6025950-byte external allocation too large for this process.
09-15 12:58:52.038: ERROR/GraphicsJNI(26900): VM won't let us allocate 6025950 bytes
09-15 12:58:52.042: DEBUG/AndroidRuntime(26900): Shutting down VM
09-15 12:58:52.042: WARN/dalvikvm(26900): threadid=1: thread exiting with uncaught exception (group=0x4001d7d0)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900): FATAL EXCEPTION: main
09-15 12:58:52.062: ERROR/AndroidRuntime(26900): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.curl/com.android.curl.StandaloneExample}: android.view.InflateException: Binary XML file line #11: Error inflating class com.android.curl.PageCurlView
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.app.ActivityThread.access$2300(ActivityThread.java:125)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.os.Handler.dispatchMessage(Handler.java:99)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.os.Looper.loop(Looper.java:123)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.app.ActivityThread.main(ActivityThread.java:4627)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at java.lang.reflect.Method.invokeNative(Native Method)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at java.lang.reflect.Method.invoke(Method.java:521)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at dalvik.system.NativeStart.main(Native Method)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900): Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class com.android.curl.PageCurlView
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.view.LayoutInflater.createView(LayoutInflater.java:513)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:210)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.app.Activity.setContentView(Activity.java:1647)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at com.android.curl.StandaloneExample.onCreate(StandaloneExample.java:26)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     ... 11 more
09-15 12:58:52.062: ERROR/AndroidRuntime(26900): Caused by: java.lang.reflect.InvocationTargetException
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at com.android.curl.PageCurlView.<init>(PageCurlView.java:258)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at java.lang.reflect.Constructor.constructNative(Native Method)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.view.LayoutInflater.createView(LayoutInflater.java:500)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     ... 21 more
09-15 12:58:52.062: ERROR/AndroidRuntime(26900): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.graphics.Bitmap.nativeCreate(Native Method)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.graphics.Bitmap.createBitmap(Bitmap.java:468)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.graphics.Bitmap.createBitmap(Bitmap.java:435)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:340)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:590)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:564)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:425)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:448)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:474)
09-15 12:58:52.062: ERROR/AndroidRuntime(26900):     at com.android.curl.PageCurlView.init(PageCurlView.java:345)
09-开发者_JAVA百科15 12:58:52.062: ERROR/AndroidRuntime(26900):     ... 25 more
09-15 12:58:52.073: WARN/ActivityManager(2486):   Force finishing activity com.android.curl/.StandaloneExample
09-15 12:58:52.073: WARN/ActivityManager(2486):   Force finishing activity com.android.curl/.AndroidPageCurlActivity

here is my XMl

     <?xml version="1.0" encoding="utf-8"?>
     <RelativeLayout xmlns:android="schemas.android.com/apk/res/android";
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:id="@+id/RootView">

     <com.android.curl.PageCurlView 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:id="@+id/dcgpagecurlPageCurlView1" 
     android:background="@drawable/icon">
     </com.android.curl.PageCurlView>
     </RelativeLayout> 


try to use smaller background image

android:background="@drawable/icon"


Increase the amount of RAM as well as the VM Max Memory Heap size in your VM options. Go to Window-->AVD Manager-->Virtual Devices--->Edit, then click Add next to the list of specs at the bottom of the AVD profile.

Hope that helps!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜