I used ZXing for using barcode reader. it worked properly until i add actionbar to my app.(add android-support-v7-appcompat.jar to dependencies) and then when i click button to open barcode scanner :
public void btnBarcode_Click(View view) { IntentIntegrator.initiateScan(this); } My App exit with this log:
07-20 10:34:03.690: E/AndroidRuntime(23805): FATAL EXCEPTION: main 07-20 10:34:03.690: E/AndroidRuntime(23805): java.lang.IllegalStateException: Could not execute method of the activity 07-20 10:34:03.690: E/AndroidRuntime(23805): at android.view.View$1.onClick(View.java:3606) 07-20 10:34:03.690: E/AndroidRuntime(23805): at android.view.View.performClick(View.java:4211) 07-20 10:34:03.690: E/AndroidRuntime(23805): at android.view.View$PerformClick.run(View.java:17446) 07-20 10:34:03.690: E/AndroidRuntime(23805): at android.os.Handler.handleCallback(Handler.java:725) 07-20 10:34:03.690: E/AndroidRuntime(23805): at android.os.Handler.dispatchMessage(Handler.java:92) 07-20 10:34:03.690: E/AndroidRuntime(23805): at android.os.Looper.loop(Looper.java:153) 07-20 10:34:03.690: E/AndroidRuntime(23805): at android.app.ActivityThread.main(ActivityThread.java:5299) 07-20 10:34:03.690: E/AndroidRuntime(23805): at java.lang.reflect.Method.invokeNative(Native Method) 07-20 10:34:03.690: E/AndroidRuntime(23805): at java.lang.reflect.Method.invoke(Method.java:511) 07-20 10:34:03.690: E/AndroidRuntime(23805): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833) 07-20 10:34:03.690: E/AndroidRuntime(23805): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) 07-20 10:34:03.690: E/AndroidRuntime(23805): at dalvik.system.NativeStart.main(Native Method) 07-20 10:34:03.690: E/AndroidRuntime(23805): Caused by: java.lang.reflect.InvocationTargetException 07-20 10:34:03.690: E/AndroidRuntime(23805): at java.lang.reflect.Method.invokeNative(Native Method) 07-20 10:34:03.690: E/AndroidRuntime(23805): at java.lang.reflect.Method.invoke(Method.java:511) 07-20 10:34:03.690: E/AndroidRuntime(23805): at android.view.View$1.onClick(View.java:3601) 07-20 10:34:03.690: E/AndroidRuntime(23805): ... 11 more 07-20 10:34:03.690: E/AndroidRuntime(23805): Caused by: java.lang.IllegalArgumentException: Can only use lower 16 bits for requestCode 07-20 10:34:03.690: E/AndroidRuntime(23805): at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:822) 07-20 10:34:03.690: E/AndroidRuntime(23805): at pl.looksok.listviewdemo.IntentIntegrator.initiateScan(IntentIntegrator.java:179) 07-20 10:34:03.690: E/AndroidRuntime(23805): at pl.looksok.listviewdemo.IntentIntegrator.initiateScan(IntentIntegrator.java:140) 07-20 10:34:03.690: E/AndroidRuntime(23805): at pl.looksok.listviewdemo.IntentIntegrator.initiateScan(IntentIntegrator.java:102) 07-20 10:34:03.690: E/AndroidRuntime(23805): at pl.looksok.listviewdemo.AddNewPerson.btnBarcode_Click(AddNewPerson.java:107) 07-20 10:34:03.690: E/AndroidRuntime(23805): ... 14 more is it related with "android-support-v7-appcompat.jar" or no?