I am using appcompat_v7 for actionbar compatability & android-support-v4.jar for fragment compatability, but my app crashes in 2.2.
Logcat
07-17 12:43:27.785: I/dalvikvm(327): Could not find method android.content.pm.PackageManager.getActivityLogo, referenced from method android.support.v7.internal.widget.ActionBarView.<init>
07-17 12:43:27.785: W/dalvikvm(327): VFY: unable to resolve virtual method 319: Landroid/content/pm/PackageManager;.getActivityLogo (Landroid/content/ComponentName;)Landroid/graphics/drawable/Drawable;
07-17 12:43:27.795: D/dalvikvm(327): VFY: replacing opcode 0x6e at 0x008b
07-17 12:43:27.795: I/dalvikvm(327): Could not find method android.content.pm.ApplicationInfo.loadLogo, referenced from method android.support.v7.internal.widget.ActionBarView.<init>
07-17 12:43:27.795: W/dalvikvm(327): VFY: unable to resolve virtual method 315: Landroid/content/pm/ApplicationInfo;.loadLogo (Landroid/content/pm/PackageManager;)Landroid/graphics/drawable/Drawable;
07-17 12:43:27.795: D/dalvikvm(327): VFY: replacing opcode 0x6e at 0x0099
07-17 12:43:27.805: D/dalvikvm(327): VFY: dead code 0x008e-0092 in Landroid/support/v7/internal/widget/ActionBarView;.<init> (Landroid/content/Context;Landroid/util/AttributeSet;)V
07-17 12:43:27.805: D/dalvikvm(327): VFY: dead code 0x009c-00a0 in Landroid/support/v7/internal/widget/ActionBarView;.<init> (Landroid/content/Context;Landroid/util/AttributeSet;)V
07-17 12:43:28.055: I/dalvikvm(327): Could not find method com.example.indianconstitution.MainActivity.invalidateOptionsMenu, referenced from method com.example.indianconstitution.MainActivity$1.onDrawerClosed
07-17 12:43:28.055: W/dalvikvm(327): VFY: unable to resolve virtual method 8698: Lcom/example/indianconstitution/MainActivity;.invalidateOptionsMenu ()V
07-17 12:43:28.055: D/dalvikvm(327): VFY: replacing opcode 0x6e at 0x002d
07-17 12:43:28.055: D/dalvikvm(327): VFY: dead code 0x0030-0030 in Lcom/example/indianconstitution/MainActivity$1;.onDrawerClosed (Landroid/view/View;)V
07-17 12:43:28.065: I/dalvikvm(327): Could not find method com.example.indianconstitution.MainActivity.invalidateOptionsMenu, referenced from method com.example.indianconstitution.MainActivity$1.onDrawerOpened
07-17 12:43:28.065: W/dalvikvm(327): VFY: unable to resolve virtual method 8698: Lcom/example/indianconstitution/MainActivity;.invalidateOptionsMenu ()V
07-17 12:43:28.065: D/dalvikvm(327): VFY: replacing opcode 0x6e at 0x002d
07-17 12:43:28.065: D/dalvikvm(327): VFY: dead code 0x0030-0030 in Lcom/example/indianconstitution/MainActivity$1;.onDrawerOpened (Landroid/view/View;)V
07-17 12:43:28.215: D/AndroidRuntime(327): Shutting down VM
07-17 12:43:28.225: W/dalvikvm(327): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
07-17 12:43:28.254: E/AndroidRuntime(327): FATAL EXCEPTION: main
07-17 12:43:28.254: E/AndroidRuntime(327): android.view.InflateException: Binary XML file line #7: Error inflating class <unknown>
07-17 12:43:28.254: E/AndroidRuntime(327): at android.view.LayoutInflater.createView(LayoutInflater.java:513)
07-17 12:43:28.254: E/AndroidRuntime(327): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
07-17 12:43:28.254: E/AndroidRuntime(327): at com.example.indianconstitution.NavDrawerListAdapter.getView(NavDrawerListAdapter.java:44)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.widget.AbsListView.obtainView(AbsListView.java:1315)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.widget.ListView.makeAndAddView(ListView.java:1727)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.widget.ListView.fillDown(ListView.java:652)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.widget.ListView.fillFromTop(ListView.java:709)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.widget.ListView.layoutChildren(ListView.java:1580)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.widget.AbsListView.onLayout(AbsListView.java:1147)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.view.View.layout(View.java:7035)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:767)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.view.View.layout(View.java:7035)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.view.View.layout(View.java:7035)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1249)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1125)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.widget.LinearLayout.onLayout(LinearLayout.java:1042)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.view.View.layout(View.java:7035)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.view.View.layout(View.java:7035)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.view.View.layout(View.java:7035)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.view.ViewRoot.performTraversals(ViewRoot.java:1045)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.os.Handler.dispatchMessage(Handler.java:99)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.os.Looper.loop(Looper.java:123)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.app.ActivityThread.main(ActivityThread.java:4627)
07-17 12:43:28.254: E/AndroidRuntime(327): at java.lang.reflect.Method.invokeNative(Native Method)
07-17 12:43:28.254: E/AndroidRuntime(327): at java.lang.reflect.Method.invoke(Method.java:521)
07-17 12:43:28.254: E/AndroidRuntime(327): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-17 12:43:28.254: E/AndroidRuntime(327): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-17 12:43:28.254: E/AndroidRuntime(327): at dalvik.system.NativeStart.main(Native Method)
07-17 12:43:28.254: E/AndroidRuntime(327): Caused by: java.lang.reflect.InvocationTargetException
07-17 12:43:28.254: E/AndroidRuntime(327): at android.widget.TextView.<init>(TextView.java:321)
07-17 12:43:28.254: E/AndroidRuntime(327): at java.lang.reflect.Constructor.constructNative(Native Method)
07-17 12:43:28.254: E/AndroidRuntime(327): at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.view.LayoutInflater.createView(LayoutInflater.java:500)
07-17 12:43:28.254: E/AndroidRuntime(327): ... 36 more
07-17 12:43:28.254: E/AndroidRuntime(327): Caused by: java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x2
07-17 12:43:28.254: E/AndroidRuntime(327): at android.content.res.TypedArray.getDimensionPixelSize(TypedArray.java:463)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.view.View.<init>(View.java:2036)
07-17 12:43:28.254: E/AndroidRuntime(327): at android.widget.TextView.<init>(TextView.java:327)
07-17 12:43:28.254: E/AndroidRuntime(327): ... 40 more
07-17 12:43:28.355: D/dalvikvm(327): GC_FOR_MALLOC freed 3423 objects / 301120 bytes in 90ms
Any Idea why am I getting this error ?
How can it be solved ?
Thanks in advance
You are calling methods that does not exist in Android 2.2 (but do exist in later versions). Use Lint tool to check your code and fix it.
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
Here is my log output. I need your help determining where to begin to solve the issue:
If I execute the app in a device with version 4.4.2, no exception is thrown, but executing the app on a device with lower version, the app crashes..
12-05 11:34:50.716: E/AndroidRuntime(327): FATAL EXCEPTION: main
12-05 11:34:50.716: E/AndroidRuntime(327): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.solinpromex.casajuventudtrescantos/com.solinpromex.casajuventudtrescantos.MainActivity}: android.view.InflateException: Binary XML file line #18: Error inflating class <unknown>
12-05 11:34:50.716: E/AndroidRuntime(327): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.os.Handler.dispatchMessage(Handler.java:99)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.os.Looper.loop(Looper.java:123)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.app.ActivityThread.main(ActivityThread.java:3683)
12-05 11:34:50.716: E/AndroidRuntime(327): at java.lang.reflect.Method.invokeNative(Native Method)
12-05 11:34:50.716: E/AndroidRuntime(327): at java.lang.reflect.Method.invoke(Method.java:507)
12-05 11:34:50.716: E/AndroidRuntime(327): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
12-05 11:34:50.716: E/AndroidRuntime(327): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
12-05 11:34:50.716: E/AndroidRuntime(327): at dalvik.system.NativeStart.main(Native Method)
12-05 11:34:50.716: E/AndroidRuntime(327): Caused by: android.view.InflateException: Binary XML file line #18: Error inflating class <unknown>
12-05 11:34:50.716: E/AndroidRuntime(327): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
12-05 11:34:50.716: E/AndroidRuntime(327): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
12-05 11:34:50.716: E/AndroidRuntime(327): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.app.Activity.setContentView(Activity.java:1657)
12-05 11:34:50.716: E/AndroidRuntime(327): at com.solinpromex.casajuventudtrescantos.MainActivity.onCreate(MainActivity.java:28)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
12-05 11:34:50.716: E/AndroidRuntime(327): ... 11 more
12-05 11:34:50.716: E/AndroidRuntime(327): Caused by: java.lang.reflect.InvocationTargetException
12-05 11:34:50.716: E/AndroidRuntime(327): at java.lang.reflect.Constructor.constructNative(Native Method)
12-05 11:34:50.716: E/AndroidRuntime(327): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
12-05 11:34:50.716: E/AndroidRuntime(327): ... 22 more
12-05 11:34:50.716: E/AndroidRuntime(327): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
12-05 11:34:50.716: E/AndroidRuntime(327): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:460)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:336)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.content.res.Resources.loadDrawable(Resources.java:1709)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.widget.ImageView.<init>(ImageView.java:118)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.widget.ImageView.<init>(ImageView.java:108)
12-05 11:34:50.716: E/AndroidRuntime(327): ... 25 more
12-05 11:34:50.726: W/ActivityManager(60): Force finishing
The reason is clear:
12-05 11:34:50.716: E/AndroidRuntime(327): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
Solution: try to use the drawable with smaller resolution.
You have run out of memory which caused a bunch of issues (cannot inflate the activity xml which causes the activity to not start since you get an exception in the onCreate method that is not handled)
12-05 11:34:50.716: E/AndroidRuntime(327): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
12-05 11:34:50.716: E/AndroidRuntime(327): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:460)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:336)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.content.res.Resources.loadDrawable(Resources.java:1709)
12-05 11:34:50.716: E/AndroidRuntime(327): at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
to fix it try loading a smaller size bitmap for in your imageview for lesser devices (pre 4.4.2)
i have given read write permission in manifest file ,but i am getting this exception.
07-17 15:23:47.886: W/System.err(384): java.io.FileNotFoundException: /data/test.xlsx (Permission denied)
07-17 15:23:47.906: W/System.err(384): at org.apache.harmony.luni.platform.OSFileSystem.open(Native Method)
07-17 15:23:47.915: W/System.err(384): at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:232)
07-17 15:23:47.915: W/System.err(384): at java.io.FileOutputStream.<init>(FileOutputStream.java:94)
07-17 15:23:47.915: W/System.err(384): at java.io.FileOutputStream.<init>(FileOutputStream.java:165)
07-17 15:23:47.915: W/System.err(384): at java.io.FileOutputStream.<init>(FileOutputStream.java:144)
07-17 15:23:47.915: W/System.err(384): at com.example.excelreader.MainActivity.onCreate(MainActivity.java:44)
07-17 15:23:47.915: W/System.err(384): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
07-17 15:23:47.926: W/System.err(384): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
07-17 15:23:47.926: W/System.err(384): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
07-17 15:23:47.926: W/System.err(384): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
07-17 15:23:47.926: W/System.err(384): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
07-17 15:23:47.926: W/System.err(384): at android.os.Handler.dispatchMessage(Handler.java:99)
07-17 15:23:47.926: W/System.err(384): at android.os.Looper.loop(Looper.java:130)
07-17 15:23:47.926: W/System.err(384): at android.app.ActivityThread.main(ActivityThread.java:3683)
07-17 15:23:47.936: W/System.err(384): at java.lang.reflect.Method.invokeNative(Native Method)
07-17 15:23:47.936: W/System.err(384): at java.lang.reflect.Method.invoke(Method.java:507)
07-17 15:23:47.936: W/System.err(384): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
07-17 15:23:47.936: W/System.err(384): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
07-17 15:23:47.957: W/System.err(384): at dalvik.system.NativeStart.main(Native Method)
/data is not accessbile from a normal user. Infact if your run from adb
adb shell ls /data
you will get
opendir failed, Permission denied
data has the following permission
drwxrwx--x system system 2013-07-16 10:09 data
Help me please, who ever see this error below :
**04-24 23:24:21.012: I/dalvikvm(327): threadid=1: stack overflow on call to Ljava/lang/Class;.isPrimitive:Z**
04-24 23:24:21.012: I/dalvikvm(327): method requires 4+20+0=24 bytes, fp is 0x430c9314 (20 left)
04-24 23:24:21.012: I/dalvikvm(327): expanding stack end (0x430c9300 to 0x430c9000)
04-24 23:24:21.073: I/dalvikvm(327): Shrank stack (to 0x430c9300, curFrame is 0x430cbeb8)
04-24 23:24:21.073: D/AndroidRuntime(327): Shutting down VM
04-24 23:24:21.073: W/dalvikvm(327): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
04-24 23:24:21.512: D/dalvikvm(327): GC_FOR_MALLOC freed 4475 objects / 369040 bytes in 192ms
04-24 23:24:21.512: E/AndroidRuntime(327): FATAL EXCEPTION: main
04-24 23:24:21.512: E/AndroidRuntime(327): java.lang.StackOverflowError
04-24 23:24:21.512: E/AndroidRuntime(327): at java.lang.reflect.Array.newInstance(Array.java:473)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.text.SpannableStringBuilder.getSpans(SpannableStringBuilder.java:757)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.text.SpannableStringBuilder.sendSpanAdded(SpannableStringBuilder.java:902)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:611)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:514)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.text.Selection.setSelection(Selection.java:74)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.text.Selection.setSelection(Selection.java:85)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.text.method.ArrowKeyMovementMethod.initialize(ArrowKeyMovementMethod.java:497)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2676)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2556)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.EditText.setText(EditText.java:75)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2531)
04-24 23:24:21.512: E/AndroidRuntime(327): at com.app.tabletfc.TabletFC.setButton(TabletFC.java:236)
04-24 23:24:21.512: E/AndroidRuntime(327): at com.app.tabletfc.TabletFC$13.onTextChanged(TabletFC.java:191)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.sendOnTextChanged(TextView.java:6131)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2691)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2556)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.EditText.setText(EditText.java:75)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2531)
04-24 23:24:21.512: E/AndroidRuntime(327): at com.app.tabletfc.TabletFC.setButton(TabletFC.java:236)
04-24 23:24:21.512: E/AndroidRuntime(327): at com.app.tabletfc.TabletFC$13.onTextChanged(TabletFC.java:191)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.sendOnTextChanged(TextView.java:6131)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2691)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2556)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.EditText.setText(EditText.java:75)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2531)
04-24 23:24:21.512: E/AndroidRuntime(327): at com.app.tabletfc.TabletFC.setButton(TabletFC.java:236)
04-24 23:24:21.512: E/AndroidRuntime(327): at com.app.tabletfc.TabletFC$13.onTextChanged(TabletFC.java:191)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.sendOnTextChanged(TextView.java:6131)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2691)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2556)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.EditText.setText(EditText.java:75)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2531)
04-24 23:24:21.512: E/AndroidRuntime(327): at com.app.tabletfc.TabletFC.setButton(TabletFC.java:236)
04-24 23:24:21.512: E/AndroidRuntime(327): at com.app.tabletfc.TabletFC$13.onTextChanged(TabletFC.java:191)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.sendOnTextChanged(TextView.java:6131)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2691)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2556)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.EditText.setText(EditText.java:75)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2531)
04-24 23:24:21.512: E/AndroidRuntime(327): at com.app.tabletfc.TabletFC.setButton(TabletFC.java:236)
04-24 23:24:21.512: E/AndroidRuntime(327): at com.app.tabletfc.TabletFC$13.onTextChanged(TabletFC.java:191)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.sendOnTextChanged(TextView.java:6131)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2691)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2556)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.EditText.setText(EditText.java:75)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2531)
04-24 23:24:21.512: E/AndroidRuntime(327): at com.app.tabletfc.TabletFC.setButton(TabletFC.java:236)
04-24 23:24:21.512: E/AndroidRuntime(327): at com.app.tabletfc.TabletFC$13.onTextChanged(TabletFC.java:191)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.sendOnTextChanged(TextView.java:6131)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2691)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2556)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.EditText.setText(EditText.java:75)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2531)
04-24 23:24:21.512: E/AndroidRuntime(327): at com.app.tabletfc.TabletFC.setButton(TabletFC.java:236)
04-24 23:24:21.512: E/AndroidRuntime(327): at com.app.tabletfc.TabletFC$13.onTextChanged(TabletFC.java:191)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.sendOnTextChanged(TextView.java:6131)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2691)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2556)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.EditText.setText(EditText.java:75)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2531)
04-24 23:24:21.512: E/AndroidRuntime(327): at com.app.tabletfc.TabletFC.setButton(TabletFC.java:236)
04-24 23:24:21.512: E/AndroidRuntime(327): at com.app.tabletfc.TabletFC$13.onTextChanged(TabletFC.java:191)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.sendOnTextChanged(TextView.java:6131)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:2691)
04-24 23:24:21.512: E/AndroidRuntime(327): at android.widget.TextView.setText(TextView.java:25
Well it certainly looks like your onTextChanged handler is calling setButton, which in turn is calling setText, which is calling your onTextChanged handler again, leading to infinite recursion.
Um, don't do that.
It's hard to give more concrete advice without any more information on what you're trying to do or what your code looks like.
01-26 20:45:50.841: E/AndroidRuntime(327): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.demo.app/com.demo.app.Sencha_demoActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x0
01-26 20:45:50.841: E/AndroidRuntime(327): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
01-26 20:45:50.841: E/AndroidRuntime(327): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
01-26 20:45:50.841: E/AndroidRuntime(327): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
01-26 20:45:50.841: E/AndroidRuntime(327): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
01-26 20:45:50.841: E/AndroidRuntime(327): at android.os.Handler.dispatchMessage(Handler.java:99)
01-26 20:45:50.841: E/AndroidRuntime(327): at android.os.Looper.loop(Looper.java:123)
01-26 20:45:50.841: E/AndroidRuntime(327): at android.app.ActivityThread.main(ActivityThread.java:4363)
01-26 20:45:50.841: E/AndroidRuntime(327): at java.lang.reflect.Method.invokeNative(Native Method)
01-26 20:45:50.841: E/AndroidRuntime(327): at java.lang.reflect.Method.invoke(Method.java:521)
01-26 20:45:50.841: E/AndroidRuntime(327): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
01-26 20:45:50.841: E/AndroidRuntime(327): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
01-26 20:45:50.841: E/AndroidRuntime(327): at dalvik.system.NativeStart.main(Native Method)
01-26 20:45:50.841: E/AndroidRuntime(327): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x0
01-26 20:45:50.841: E/AndroidRuntime(327): at android.content.res.Resources.getValue(Resources.java:891)
01-26 20:45:50.841: E/AndroidRuntime(327): at android.content.res.Resources.loadXmlResourceParser(Resources.java:1865)
01-26 20:45:50.841: E/AndroidRuntime(327): at android.content.res.Resources.getXml(Resources.java:779)
01-26 20:45:50.841: E/AndroidRuntime(327): at com.phonegap.api.PluginManager.loadPlugins(PluginManager.java:82)
01-26 20:45:50.841: E/AndroidRuntime(327): at com.phonegap.api.PluginManager.<init>(PluginManager.java:62)
01-26 20:45:50.841: E/AndroidRuntime(327): at com.phonegap.DroidGap$1.run(DroidGap.java:414)
01-26 20:45:50.841: E/AndroidRuntime(327): at android.app.Activity.runOnUiThread(Activity.java:3649)
01-26 20:45:50.841: E/AndroidRuntime(327): at com.phonegap.DroidGap.loadUrlIntoView(DroidGap.java:390)
01-26 20:45:50.841: E/AndroidRuntime(327): at com.phonegap.DroidGap.loadUrl(DroidGap.java:356)
01-26 20:45:50.841: E/AndroidRuntime(327): at com.demo.app.Sencha_demoActivity.onCreate(Sencha_demoActivity.java:11)
01-26 20:45:50.841: E/AndroidRuntime(327): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-26 20:45:50.841: E/AndroidRuntime(327): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
01-26 20:45:50.841: E/AndroidRuntime(327): ... 11 more
I am a absolute beginner to phonegap and sencha touch. After reading many forums I got this plugin for eclipse : http://www.mobiledevelopersolutions.com/home/start/startdetails
But, when I am trying to run the project with google api 2.1 with minsdk version 7, I am getting the error mentioned above. Any ideas how to recitfy it?
I received a report of what is likely the same issue today and tracked it down. See AppLaud Issue #63.
The Sencha file structure changes in 2.0.0-pr4 cause the AppLaud wizard to fail to complete project creation. plugins.xml is missing and AndroidManifest.xml is not set up.
The workaround is to copy sencha-touch-all-debug-w-comments.js to sencha-touch-debug-w-comments.js and then the wizard will succeed with project completion.
This bug will be fixed in the next AppLaud update due out after the PhoneGap 1.4.0 release.
Also, note that the bundled Sencha PhoneGap example in AppLaud does not yet support the Sencha 2 APIs. See AppLaud Issue #64.
Looks like you are missing the res/xml/plugins.xml file from your project.
When I launch my app I get the following errors in the log. Can you anyone decipher some of them for me, and give me a potential solution? I would be so grateful if you could as its proving very frustrating and I am new to Android development. I am using Eclipse SDK with an Android AVD at 1.6 SDK level.
Thanks..
07-17 11:05:57.046:
ERROR/AndroidRuntime(226): Uncaught
handler: thread main exiting due to
uncaught exception 07-17
11:05:57.056:
ERROR/AndroidRuntime(226):
java.lang.RuntimeException: Unable to
start activity
ComponentInfo{com.darius.android.distractions/com.darius.android.distractions.Distractions}:
java.lang.ClassCastException:
android.widget.FrameLayout 07-17
11:05:57.056:
ERROR/AndroidRuntime(226): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401)
07-17 11:05:57.056:
ERROR/AndroidRuntime(226): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
07-17 11:05:57.056:
ERROR/AndroidRuntime(226): at
android.app.ActivityThread.access$2100(ActivityThread.java:116)
07-17 11:05:57.056:
ERROR/AndroidRuntime(226): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
07-17 11:05:57.056:
ERROR/AndroidRuntime(226): at
android.os.Handler.dispatchMessage(Handler.java:99)
07-17 11:05:57.056:
ERROR/AndroidRuntime(226): at
android.os.Looper.loop(Looper.java:123)
07-17 11:05:57.056:
ERROR/AndroidRuntime(226): at
android.app.ActivityThread.main(ActivityThread.java:4203)
07-17 11:05:57.056:
ERROR/AndroidRuntime(226): at
java.lang.reflect.Method.invokeNative(Native
Method) 07-17 11:05:57.056:
ERROR/AndroidRuntime(226): at
java.lang.reflect.Method.invoke(Method.java:521)
07-17 11:05:57.056:
ERROR/AndroidRuntime(226): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:791)
07-17 11:05:57.056:
ERROR/AndroidRuntime(226): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
07-17 11:05:57.056:
ERROR/AndroidRuntime(226): at
dalvik.system.NativeStart.main(Native
Method) 07-17 11:05:57.056:
ERROR/AndroidRuntime(226): Caused by:
java.lang.ClassCastException:
android.widget.FrameLayout 07-17
11:05:57.056:
ERROR/AndroidRuntime(226): at
com.darius.android.distractions.Distractions.onCreate(Distractions.java:87)
07-17 11:05:57.056:
ERROR/AndroidRuntime(226): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
07-17 11:05:57.056:
ERROR/AndroidRuntime(226): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
07-17 11:05:57.056:
ERROR/AndroidRuntime(226): ... 11
more
Your problem is on line 87 of your Distractions class.
The error stack complaining of a ClassCastException which is thrown when a program attempts to cast an object to a type with which it is not compatible.
It looks like you are trying to cast a FrameLayout as something it is not.
Good tip for decoding the error stack, look for the line that says Caused by: This line will give you a reason for the error and the line below will show you where the error is happening and will include a line reference so you can easily find the problem.