Crash occurs on Samsung devices (J7 and S7) running Android 7.0.
I've built a tiny test app and can reproduce the crash. Single Activity that extends Activity (not AppCompatActivity), simple layout containing a single EditText with inputType="text". Target SDK is 8.
When positioning the cursor in the EditText and typing, words are suggested and words are underlined. Click on some of the underlined words or complete editing in the EditText and then return to the EditText. After entering some data and clicking around inside the EditText, the app will crash with this stacktrace:
06-01 18:56:37.990 10339-10339/sharpmind.de.samsungtest W/ResourceType: No package identifier when getting value for resource number 0x00000000
06-01 18:56:37.991 10339-10339/sharpmind.de.samsungtest D/AndroidRuntime: Shutting down VM
06-01 18:56:37.992 10339-10339/sharpmind.de.samsungtest E/AndroidRuntime: FATAL EXCEPTION: main
Process: sharpmind.de.samsungtest, PID: 10339
android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:202)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2970)
at android.content.res.Resources.getLayout(Resources.java:1986)
at android.view.LayoutInflater.inflate(LayoutInflater.java:425)
at android.view.LayoutInflater.inflate(LayoutInflater.java:378)
at android.widget.Editor$SuggestionsPopupWindow.initContentView(Editor.java:3704)
at android.widget.Editor$PinnedPopupWindow.<init>(Editor.java:3395)
at android.widget.Editor$SuggestionsPopupWindow.<init>(Editor.java:3683)
at android.widget.Editor.replace(Editor.java:432)
at android.widget.Editor$3.run(Editor.java:2359)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)
With target SDK set to 14, the crash does not occur.
If I disable the autocorrect and word suggestions (which isn't that easy to do on a Samsung device), the crash also does not occur. But this makes my users really really angry, so it isn't a viable solution.
Activity:
public class MainActivity extends Activity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
Layout:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<EditText
android:id="#+id/edittext"
android:layout_width="match_parent"
android:minHeight="200dp"
android:inputType="text"
android:layout_height="wrap_content"/>
</RelativeLayout>
Related
When I try to select text many times in the TextView, the application crashes with the error.
Does anyone know what could be the problem?
Error Stacktrace:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: *** PID: 11481
java.lang.IndexOutOfBoundsException: setSpan (-1 ... -1) starts before 0
at android.text.SpannableStringInternal.checkRange(SpannableStringInternal.java:442)
at android.text.SpannableStringInternal.setSpan(SpannableStringInternal.java:163)
at android.text.SpannableStringInternal.setSpan(SpannableStringInternal.java:152)
at android.text.SpannableString.setSpan(SpannableString.java:46)
at android.text.Selection.setSelection(Selection.java:76)
at android.widget.Editor$SelectionModifierCursorController.resetDragAcceleratorState(Editor.java:5790)
at android.widget.Editor$SelectionModifierCursorController.onTouchEvent(Editor.java:5627)
at android.widget.Editor.onTouchEvent(Editor.java:1416)
at android.widget.TextView.onTouchEvent(TextView.java:9922)
at android.view.View.dispatchTouchEvent(View.java:11843)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2981)
....
2019-07-28 16:00:53.369 11481-11481/? E/AndroidRuntime: at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4650)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4623)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7222)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7196)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7157)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7379)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:193)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:379)
at android.os.Looper.loop(Looper.java:144)
at android.app.ActivityThread.main(ActivityThread.java:7383)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)
Here is the markup for TextView:
<TextView
android:id="#+id/list_item_message_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_marginBottom="6dp"
android:gravity="center_vertical"
android:inputType="none"
android:linksClickable="true"
android:singleLine="false"
android:text="TextView"
android:lineSpacingExtra="3dp"
android:textIsSelectable="true"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />
In the code I set the attribute: messageView.setMovementMethod (LinkMovementMethod.getInstance ());
I was able to reproduce only on android O and android N, in the following scenario:
Given a RecyclerView which presents a ViewHolder containing a TextView
That TextView as .setTextIsSelectable(true) and .setMovementMethod(LinkMovementMethod.getInstance())
Selecting a text from TextView and scrolling away from that particular view will cause crash. In particular, scrolling away while having presented that system overlay which offers "Copy", "Cut", "Paste", etc
So, my workaround (not a real solution but it will prevent crashes and it doesn't take users out of my app) was not allowing text selection on affected builds:
val selectable = when {
Build.VERSION.SDK_INT <= Build.VERSION_CODES.M -> true
Build.VERSION.SDK_INT >= Build.VERSION_CODES.P -> true
else -> false
}
textView.setTextIsSelectable(selectable)
textView.setMovementMethod(LinkMovementMethod.getInstance())
remove this
android:lineSpacingExtra="3dp"
Try to specify android:inputType="text". As well, you can add android:autoLink="all"
I think this is a problem in the Android Framework. Similar to the one described here:
java.lang.IndexOutOfBoundsException: getChars (7 ... 0) has end before start
Because and I have a similar error too. Thank you all.
We're debugging a crash in a Cordova app that seems to happen on launch / foregrounding, after the app was backgrounded for a moderate amount of time and has been to some extent killed by the OS.
At the time of the crash the app is attempting to show a native dialog fragment for Fingerprint Authentication. For some reason in this case the resources for this fragment cannot be found.
It's been reported for Android 6 and 7, on older and newer devices.
java.lang.RuntimeException: Unable to start activity ComponentInfo{ca.koho/ca.koho.Koho}: android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2421)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481)
at android.app.ActivityThread.access$900(ActivityThread.java:155)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:174)
at android.app.ActivityThread.main(ActivityThread.java:5440)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.content.res.Resources.getValue(Resources.java:1437)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2887)
at android.content.res.Resources.getLayout(Resources.java:1251)
at android.view.LayoutInflater.inflate(LayoutInflater.java:421)
at com.cordova.plugin.android.fingerprintauth.FingerprintAuthenticationDialogFragment.onCreateView(FingerprintAuthenticationDialogFragment.java:85)
at android.app.Fragment.performCreateView(Fragment.java:2220)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:973)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1148)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1130)
at android.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:1953)
at android.app.FragmentController.dispatchActivityCreated(FragmentController.java:152)
at android.app.Activity.performCreateCommon(Activity.java:6279)
at android.app.Activity.performCreate(Activity.java:6287)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2374)
... 9 more
Here's the problematic bit of code, from the DialogFragment's onCreateView:
int fingerprint_dialog_container_id = getResources()
.getIdentifier("fingerprint_dialog_container", "layout",
FingerprintAuth.packageName);
View v = inflater.inflate(fingerprint_dialog_container_id, container, false);
When the crash happens, getIdentifier(...) is for some reason returning 0. Most of the time the actual identifier is returned.
I have not found a way to reproduce the crash, and advice to enable developer options like 'Don't keep activities' and 'Background process limit' had did not help.
Thanks for any help.
I have an app that is about a year old, is on the Play store in beta, has gone through dozens of revisions. All of a sudden I'm getting an error:
Could not find a method onClick_Foo(View) in the activity class
android.view.ContextThemeWrapper for onClick handler on view class
android.widget.Button with id 'Foo_Button'
I'm getting this error on every one of the 7 buttons defined in my XML. Since yesterday I've updating appcompat-v7 from 21.0.3 to 22.0.0 but also upgraded my testing device from KitKat to Lollipop for the first time.
I've double-checked spellings, capitalizations, none of the usual suspects explains this. Here's a sample of the relevant code. Let me know if you feel more would be helpful. (The activity has 915 lines of code and the xml 186, so don't ask for the whole thing). Testing on a Verizon Note 4 running Lollipop 5.0.1
activity_pick.xml:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:theme="#style/AppTheme"
tools:context="com.myapp.Pick"
android:layout_height="match_parent"
android:layout_width="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
android:paddingBottom="#dimen/activity_vertical_margin"
android:orientation="vertical">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/Ratings_Button"
android:textSize="16dp"
android:text="#string/Pick_Ratings_Button"
android:onClick="onClick_Ratings"
android:background="#android:drawable/btn_default"/>
</LinearLayout>
</ScrollView>
Pick.java:
public class Pick_Restaurant extends ActionBarActivity {
public void onClick_Ratings (View v) {
Intent intent = new Intent(mContext, Ratings.class);
startActivityForResult(intent,RATINGS);
}
}
build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
minSdkVersion 15
targetSdkVersion 22
versionCode 59
versionName "0.6.4"
}
...
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.google.android.gms:play-services:7.0.0'
compile files('libs/mobileservices-1.1.5.jar')
}
Full Error on Log:
04-08 17:06:40.578 3508-3508/com.myapp.debug E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.myapp.debug, PID: 3508
java.lang.IllegalStateException: Could not find a method onClick_Ratings(View) in the activity class android.view.ContextThemeWrapper for onClick handler on view class android.widget.Button with id 'Ratings_Button'
at android.view.View$1.onClick(View.java:4234)
at android.view.View.performClick(View.java:5191)
at android.view.View$PerformClick.run(View.java:20916)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5974)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)
Caused by: java.lang.NoSuchMethodException: onClick_Ratings [class android.view.View]
at java.lang.Class.getMethod(Class.java:665)
at android.view.View$1.onClick(View.java:4227)
at android.view.View.performClick(View.java:5191)
at android.view.View$PerformClick.run(View.java:20916)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5974)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)
It looks like this is a new issue with Android 5.0.
From this anwer, removing the Theme from the layout xml fixed this issue for them.
So in your case, remove the theme from your layout:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<!--android:theme="#style/AppTheme"--> <!-- Remove this -->
<!--................-->
</ScrollView>
And add the theme in the AndroidManifest.xml instead:
android:theme="#android:style/AppTheme"
I have just answered a similar question here
Basically, since Android 5.0 individual views can be themed.
To facilitate this, a ContextThemeWrapper is used to modify the underlying theme assigned to the Activity and assigned as the Context of the View. Since this Context is not your Activity anymore (the Activity has to be separate because it still has to return the original theme) the callbacks don't exist and you get the error you see.
If you don't really want to theme individual views the obvious solution is to not do so and theme the activity instead, as already suggested.
If you do indeed want to theme individual views, it appears that the android:onClick attribute cannot be used and you will have to fall back to manually assign an OnClickListener.
The question is, why did this work pre Lollipop? I can only speculate that because the functionality to theme individual views didn't exist, applying a theme attribute to a view would just change the default theme on the Activity as well.
Such things usually happens when you declare onClick in xml like you did:
android:onClick="onClick_Ratings"
Just make sure you are using this layout in that activity. Because the exception is clearly saying that your activity don't have the corresponding method which you did show you have:
public void onClick_Ratings (View v) {
Intent intent = new Intent(mContext, Ratings.class);
startActivityForResult(intent,RATINGS);
}
Also I guess you should declare the activity in your xml like:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".SendMessageActivity">
And actually log says:
Could not find a method onClick_Ratings(View) in the activity class
android.view.ContextThemeWrapper
there is something wrong since android.view.ContextThemeWrapper is not an Activity and not the activity from your xml com.myapp.Pick (I assume Pick is an activity and not the fragment). Maybe try to clean up the project, ivalidate caches and restart.
If nothing helps I suggest you to return back to previuos version of support lib you'd mentioned OR to set onClickListener in code instead of xml.
Removing android:theme works. But this is caused because using android:onclick in xml. If you use onClick in Java file, you can still use android:theme.
According to your code,
activity_pick.xml [Remove onclick here]
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/Ratings_Button"
android:textSize="16dp"
android:text="#string/Pick_Ratings_Button"
android:background="#android:drawable/btn_default" />
Go to your Java File, that is, pick.java in your case:
final Button button = (Button) findViewById(R.id.Ratings_Button);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent activityChangeIntent = new Intent(CurrentActivity.this, SecondActivity.class);
SplashScreen.this.startActivity(activityChangeIntent);
}
});
Experienced the same error, app has stopped working, when material button was clicked programmatically helped me. Check it out :)
I just released an alarm app and it's been hell. It's breaking on certain devices when they try to open up the alarm list screen. I have no idea why it's breaking on some devices and not others. Every phone I've seen it tried on it works perfectly, but opening up the alarm list on some other devices blows it up. I'm really out of my depth for this kind of specific device compatibility issue.
The code at AlarmClock line 227 is this:
View changeSettings = findViewById(R.id.alarm_settings);
changeSettings.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
startActivity(new Intent(getApplicationContext(), SettingsActivity.class));
}
});
And it references this line of xml:
<Button
android:id="#+id/alarm_settings"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0.0dip" android:layout_height="fill_parent"
android:text="#string/menu_settings"
android:layout_weight="1.0" />
This links to a settings activity I borrowed the source of from an adapted version of the android stock alarm, but it uses addPreferencesFromResource which is allegedly deprecated. Is that what's causing this problem?
This is the stack trace from the user's device:
Nexus 7
Touched setup alarm button and then it crashed
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.nathantempelman.GoodMorningAlarmFree/com.nathantempelman.alarmclockfree.AlarmClock}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2185)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2210)
at android.app.ActivityThread.access$600(ActivityThread.java:142)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1208)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4931)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.nathantempelman.alarmclockfree.AlarmClock.updateLayout(AlarmClock.java:227)
at com.nathantempelman.alarmclockfree.AlarmClock.onCreate(AlarmClock.java:210)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2139)
... 11 more
Any help would be splendiferous. I know that it's happened on someone else's tablet as well, not sure if it's a tablet issue.
The app is here if anyone wants to give it a test: https://play.google.com/store/apps/details?id=com.nathantempelman.GoodMorningAlarmFree
you have a NullPointerException in your AlarmClock class in updateLayout method in line 227 :)
Caused by: java.lang.NullPointerException
at com.nathantempelman.alarmclockfree.AlarmClock.updateLayout(AlarmClock.java:227)
at com.nathantempelman.alarmclockfree.AlarmClock.onCreate(AlarmClock.java:210)
i would check that code first.
as you didn't post any code, i cant help more at the moment :)
Just in case someone else stumbles across this, the problem in the end was that there was a separate layout file for tablets which I hadn't seen in the source codebase I borrowed for a part of my application. I had obviously added a bunch of functionality, but hadn't updated the tablet layout. The buttons to access the things I had added weren't in the tablet layout file. Ergo, null pointer exception only when a tablet device loaded the tablet layout file and searched for non existent objects in the display. When I deleted that file, everything worked perfectly.
I know, hurp and or durp. But maybe someone has the same problem and might want to check for this.
I got the following crash report in the android market place. While testing I haven't found any crash and my app works fine. Once I published my app I got the following crash report which I have shown below.
But I am not able to find where the crash occurs, I checked in some stack overflow question and there in some cases I got that use of setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD); make cause crash in some devices. Is it true because in my app in some activity I have used this line of code in order to change the input type of EditText from password-text / text-password?
Please help me to solve this out.
Stack Trace
java.lang.NullPointerException
at android.widget.TextView.onTouchEvent(TextView.java:7529)
at android.view.View.dispatchTouchEvent(View.java:3933)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:906)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:906)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:906)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:906)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:906)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:906)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1877)
at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1211)
at android.app.Activity.dispatchTouchEvent(Activity.java:2198)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1852)
at android.view.ViewRoot.deliverPointerEvent(ViewRoot.java:2382)
at android.view.ViewRoot.handleMessage(ViewRoot.java:2010)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:4385)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
at dalvik.system.NativeStart.main(Native Method)
<EditText
android:id="#+id/txt_edit_passwrd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/txt_passwrd_title"
android:background="#drawable/img_password_textbox"
android:cursorVisible="true"
android:layout_marginTop="195dp"
android:hint="#string/passwrd_hint_text"
android:inputType="textPassword"
android:maxLength="10"
android:padding="10dp"
android:textColor="#121212" >
</EditText>
NullPointerException in my own experience tends to mean it cannot find a reference object for instance the edit text your setting the input type for cannot be found, check your layout references and how you've declared the EditText itself.
First check , Have you mention Minimum_sdk_version in android-manifest?
if not then following may be the reason of crashing your application--
If you are using that functionality of android o.s that does not support on customer device.Say you are using Finger_Pointer(as MotionEvent.ACTION_POINTER_DOWN) which does not support before android 2.0.
Or you are using onBackPressed() which does not support for android 1.6.I just gave you hint you can check other issue like this if you have
Updated
For HTC device, TextView's property InputType.TYPE_CLASS_NUMBER lead to crash
Here is the same problem discussed you can refer to this also.
The Solution is not to use "setInputType" with a TextView. You don't need input type filtering for TextViews anyway since they are for displaying text only. Input type is only needed for EditText (and there it works). I had the same problem with Android versions below 4.2.
The disadvantage is, that applying input type "password" on a textview actually makes sense as it masks the password, which may be intended (it was in my case). But this causes random crashes when touching or scrolling over the textview.