これで約1時間立ち往生しています-簡単な修正かもしれませんが、私はそれを理解できません.
開始画面にボタンがあり、クリックすると別のアクティビティに移動します。
これはxmlからのものです:
<ImageButton
android:id="@+id/btn_text_scan"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/scan_button_description"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@null"
android:gravity="center"
android:scaleType="centerInside"
android:onClick="textExtract"
android:src="@drawable/ic_btn_text" />
これはマニフェストからのものです:
<activity
android:configChanges="orientation|keyboardHidden"
android:launchMode="singleTop"
android:name=".OCRActivity">
</activity>
そして、移動したいクラスから、このコードを使用して他のアクティビティに移動します。(ただし、このコードを削除しても、まだこの問題が発生します-おそらくこれではないでしょう)
public void textExtract(View view)
{
Intent intent = new Intent(ScannerActivity.this, OCRActivity.class);
startActivity(intent);
}
アクティビティのコードを提供できますが、これは必要ないと思います
どんな助けでも大歓迎です!ダン
EDIT LogCat エラー http://i.imgur.com/zK43neM.png