Android マーケットから、次のクラッシュ レポートを入手しました。アプリのテスト中に見つけられなかったもの。クラッシュはPasswordActivity
クラスで発生します。スタックトレースとコードを送ります。クラッシュが発生した場所とその理由を誰かに教えてもらえますか?
スタックトレース
java.lang.IncompatibleClassChangeError: interface not implemented
at in.plackal.lovecyclesfree.PasswordActivity.onCreate(PasswordActivity.java)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
at dalvik.system.NativeStart.main(Native Method)
マイコード
public class PasswordActivity extends Activity implements Utilities { //プライベート変数 private EditText m_passwrdEditText;
private TextView m_passwrdErrorText;
private Resources m_res;
@Override
public void onCreate(Bundle savedInstanceState) {
//Setup the activity
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
if (dm.widthPixels == 320 && dm.heightPixels == 480) {
setContentView(R.layout.password_activity_hvga);
} else {
setContentView(R.layout.password_activity);
}
GoogleAnalyticsTracker tracker = GoogleAnalyticsTracker.getInstance();;
tracker.startNewSession("UA-xxxxxxx-1", this);
tracker.trackPageView("Password");
tracker.dispatch();
m_res = getResources();
final Typeface face = Typeface.createFromAsset(getAssets(), "fonts/Cicle Semi.otf");
m_passwrdErrorText = (TextView) findViewById(R.id.txt_error_message);
m_passwrdErrorText.setTypeface(face);
m_passwrdEditText = (EditText) findViewById(R.id.txt_edit_passwrd);
m_passwrdEditText.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
m_passwrdEditText.setHint("");
m_passwrdEditText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
m_passwrdEditText.setTypeface(face);
}
});
m_passwrdEditText.setTypeface(face);
m_passwrdEditText.setOnKeyListener(new OnKeyListener() {
public boolean onKey(View v, int keyCode, KeyEvent event) {
if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER)) {
String strPassEntered = m_passwrdEditText.getText().toString();
String strPassSaved = CycleManager.getSingletonObject().getPassWord();
m_passwrdEditText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
if (strPassSaved.equals(strPassEntered) || strPassEntered.equals(DEFAULT_PASSWORD)) {
Intent intent = new Intent(PasswordActivity.this, ActivityManager.class);
startActivity(intent);
PasswordActivity.this.finish();
} else {
m_passwrdErrorText.setText(m_res.getString(R.string.passwrd_error_text));
m_passwrdEditText.setFocusable(true);
}
} else if (keyCode == KeyEvent.KEYCODE_DEL) {
m_passwrdEditText.setHint(m_res.getString(R.string.passwrd_hint_text));
m_passwrdErrorText.setText("");
}
m_passwrdEditText.setTypeface(face);
return false;
}
});
}
}