I'm trying to use some emulators to run my apps for debugging. This app runs perfectly on my phone, but when I load it up into the emulator it crashes whenever I invoke an opencv function. The emulator is using the intel atom x86 cpu. Do I have to run them with the arm7?
Stack trace:
02-13 04:25:51.986: E/AndroidRuntime(2006): FATAL EXCEPTION: main
02-13 04:25:51.986: E/AndroidRuntime(2006): java.lang.ExceptionInInitializerError
02-13 04:25:51.986: E/AndroidRuntime(2006): at com.uas.Processor.extract(Processor.java:48)
02-13 04:25:51.986: E/AndroidRuntime(2006): at com.uas.ImageProcessorActivity.onMenuItemClick(ImageProcessorActivity.java:626)
02-13 04:25:51.986: E/AndroidRuntime(2006): at android.widget.PopupMenu.onMenuItemSelected(PopupMenu.java:142)
02-13 04:25:51.986: E/AndroidRuntime(2006): at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:735)
02-13 04:25:51.986: E/AndroidRuntime(2006): at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:149)
02-13 04:25:51.986: E/AndroidRuntime(2006): at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:874)
02-13 04:25:51.986: E/AndroidRuntime(2006): at com.android.internal.view.menu.MenuPopupHelper.onItemClick(MenuPopupHelper.java:156)
02-13 04:25:51.986: E/AndroidRuntime(2006): at android.widget.AdapterView.performItemClick(AdapterView.java:298)
02-13 04:25:51.986: E/AndroidRuntime(2006): at android.widget.AbsListView.performItemClick(AbsListView.java:1100)
02-13 04:25:51.986: E/AndroidRuntime(2006): at android.widget.AbsListView$PerformClick.run(AbsListView.java:2749)
02-13 04:25:51.986: E/AndroidRuntime(2006): at android.widget.AbsListView$1.run(AbsListView.java:3423)
02-13 04:25:51.986: E/AndroidRuntime(2006): at android.os.Handler.handleCallback(Handler.java:725)
02-13 04:25:51.986: E/AndroidRuntime(2006): at android.os.Handler.dispatchMessage(Handler.java:92)
02-13 04:25:51.986: E/AndroidRuntime(2006): at android.os.Looper.loop(Looper.java:137)
02-13 04:25:51.986: E/AndroidRuntime(2006): at android.app.ActivityThread.main(ActivityThread.java:5039)
02-13 04:25:51.986: E/AndroidRuntime(2006): at java.lang.reflect.Method.invokeNative(Native Method)
02-13 04:25:51.986: E/AndroidRuntime(2006): at java.lang.reflect.Method.invoke(Method.java:511)
02-13 04:25:51.986: E/AndroidRuntime(2006): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
02-13 04:25:51.986: E/AndroidRuntime(2006): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
02-13 04:25:51.986: E/AndroidRuntime(2006): at dalvik.system.NativeStart.main(Native Method)
02-13 04:25:51.986: E/AndroidRuntime(2006): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load opencv_java from loader dalvik.system.PathClassLoader[dexPath=/data/app/com.uas-1.apk,libraryPath=/data/app-lib/com.uas-1]: findLibrary returned null
02-13 04:25:51.986: E/AndroidRuntime(2006): at java.lang.Runtime.loadLibrary(Runtime.java:365)
02-13 04:25:51.986: E/AndroidRuntime(2006): at java.lang.System.loadLibrary(System.java:535)
02-13 04:25:51.986: E/AndroidRuntime(2006): at org.opencv.core.Mat.<clinit>(Mat.java:2065)
02-13 04:25:51.986: E/AndroidRuntime(2006): ... 20 more
Related
We tried integrating HelpStack by following steps given on GitHub, but we kept getting the following errors:
04-03 13:54:22.054 4638-4638/com.playerline.android E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.playerline.android/com.tenmiles.helpstack.activities.HomeActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
at android.app.ActivityThread.access$600(ActivityThread.java:127)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4448)
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:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.tenmiles.helpstack.activities.HSActivityParent.onCreate(HSActivityParent.java:48)
at com.tenmiles.helpstack.activities.HomeActivity.onCreate(HomeActivity.java:46)
at android.app.Activity.performCreate(Activity.java:4465)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
at android.app.ActivityThread.access$600(ActivityThread.java:127)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4448)
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:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
I'm guessing it has something to do with the App Theme, which in our case is is Theme.AppCompat.NoActionBar.
My app crashes when I try to open in. The only change I've made was adding a .ogg file to my res/raw directory. It's really weird. I haven't added any codes or made any other changes. I just dragged a sound file into raw and compiled. It just keeps saying "unfortunately blah has stopped". Are there any obvious things I should check?
MainActivity.onCreate:
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.engine_layout);
myEngineView = (EngineView) findViewById(R.id.engineviewid);
myEngineView.setKeepScreenOn(true);
}
I get this in logcat:
E/AndroidRuntime(12560): FATAL EXCEPTION: main
E/AndroidRuntime(12560): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.thing/com.example.thing.MainActivity}: java.lang.NullPointerException
E/AndroidRuntime(12560): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
E/AndroidRuntime(12560): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2211)
E/AndroidRuntime(12560): at android.app.ActivityThread.access$600(ActivityThread.java:149)
E/AndroidRuntime(12560): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
E/AndroidRuntime(12560): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(12560): at android.os.Looper.loop(Looper.java:153)
E/AndroidRuntime(12560): at android.app.ActivityThread.main(ActivityThread.java:4987)
E/AndroidRuntime(12560): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(12560): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(12560): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
E/AndroidRuntime(12560): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
E/AndroidRuntime(12560): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(12560): Caused by: java.lang.NullPointerException
E/AndroidRuntime(12560): at com.example.thing.MainActivity.onCreate(MainActivity.java:18)
E/AndroidRuntime(12560): at android.app.Activity.performCreate(Activity.java:5020)
E/AndroidRuntime(12560): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
E/AndroidRuntime(12560): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
E/AndroidRuntime(12560): ... 11 more
E/AppErrorDialog( 338): Failed to get ILowStorageHandle instance
E/Trace (12585): error opening trace file: No such file or directory (2)
E/AndroidRuntime(12585): FATAL EXCEPTION: main
E/AndroidRuntime(12585): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.thing/com.example.thing.MainActivity}: java.lang.NullPointerException
E/AndroidRuntime(12585): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
E/AndroidRuntime(12585): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2211)
E/AndroidRuntime(12585): at android.app.ActivityThread.access$600(ActivityThread.java:149)
E/AndroidRuntime(12585): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
E/AndroidRuntime(12585): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(12585): at android.os.Looper.loop(Looper.java:153)
E/AndroidRuntime(12585): at android.app.ActivityThread.main(ActivityThread.java:4987)
E/AndroidRuntime(12585): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(12585): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(12585): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
E/AndroidRuntime(12585): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
E/AndroidRuntime(12585): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(12585): Caused by: java.lang.NullPointerException
E/AndroidRuntime(12585): at com.example.thing.MainActivity.onCreate(MainActivity.java:18)
E/AndroidRuntime(12585): at android.app.Activity.performCreate(Activity.java:5020)
E/AndroidRuntime(12585): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
E/AndroidRuntime(12585): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
E/AndroidRuntime(12585): ... 11 more
I have used GreenDroid library in my application. There is no error on compilation (building). When I run this application on emulator it shows this error in console as
[2013-02-13 18:10:08 - GreenDroid] Could not find GreenDroid.apk!
[2013-02-13 18:10:08 - GreenDroid-GoogleAPIs] Could not find GreenDroid-GoogleAPIs.apk!
And in log cat error
02-13 18:10:17.115: E/AndroidRuntime(421): FATAL EXCEPTION: main
02-13 18:10:17.115: E/AndroidRuntime(421): java.lang.NoClassDefFoundError: com.cyrilmottier.android.greendroid.R$layout
02-13 18:10:17.115: E/AndroidRuntime(421): at greendroid.app.GDActivity.createLayout(GDActivity.java:177)
02-13 18:10:17.115: E/AndroidRuntime(421): at greendroid.app.GDActivity.ensureLayout(GDActivity.java:187)
02-13 18:10:17.115: E/AndroidRuntime(421): at greendroid.app.GDActivity.getActionBar(GDActivity.java:265)
02-13 18:10:17.115: E/AndroidRuntime(421): at com.singaporegp.f1.home.F1_Splash.onCreate(F1_Splash.java:41)
02-13 18:10:17.115: E/AndroidRuntime(421): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-13 18:10:17.115: E/AndroidRuntime(421): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
02-13 18:10:17.115: E/AndroidRuntime(421): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
02-13 18:10:17.115: E/AndroidRuntime(421): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
02-13 18:10:17.115: E/AndroidRuntime(421): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
02-13 18:10:17.115: E/AndroidRuntime(421): at android.os.Handler.dispatchMessage(Handler.java:99)
02-13 18:10:17.115: E/AndroidRuntime(421): at android.os.Looper.loop(Looper.java:130)
02-13 18:10:17.115: E/AndroidRuntime(421): at android.app.ActivityThread.main(ActivityThread.java:3683)
02-13 18:10:17.115: E/AndroidRuntime(421): at java.lang.reflect.Method.invokeNative(Native Method)
02-13 18:10:17.115: E/AndroidRuntime(421): at java.lang.reflect.Method.invoke(Method.java:507)
02-13 18:10:17.115: E/AndroidRuntime(421): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
02-13 18:10:17.115: E/AndroidRuntime(421): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
02-13 18:10:17.115: E/AndroidRuntime(421): at dalvik.system.NativeStart.main(Native Method)
How can I solve this issue?
I've tried to try in order:
Check the project is not set as a library:
Go to Project->Properties
Select Android from left-hand side list
Uncheck the "Is Library" checkbox
Clean and rebuild the project - this should delete and recreate the entire gen folder, including the R.java file mentioned in some peoples answers
Check eclipse and all the Android plugins are up to date
Close the project, exit Eclipse, reopen eclipse, reopen the project.
Go to Java Build Path > Projects and check for any incorrect project dependencies
Go to the main preferences for Eclipse and under Android->Build uncheck 'Skip packaging and dexing until export or launch'
I want to create a feedback field for my application. I just want redirect the user to the market like this
String APP_MARKET_URL = "market://details?id=com.my.application";
Intent intent = new Intent( Intent.ACTION_VIEW, Uri.parse(APP_MARKET_URL));
this.startActivity(intent);
But when i execute it i have this error:
02-13 11:07:33.147: W/dalvikvm(238): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
02-13 11:07:33.155: E/AndroidRuntime(238): Uncaught handler: thread main exiting due to uncaught exception
02-13 11:07:33.225: E/AndroidRuntime(238): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.picca.pointage.NoterApplication }
02-13 11:07:33.225: E/AndroidRuntime(238): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1408)
02-13 11:07:33.225: E/AndroidRuntime(238): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
02-13 11:07:33.225: E/AndroidRuntime(238): at android.app.Activity.startActivityForResult(Activity.java:2749)
02-13 11:07:33.225: E/AndroidRuntime(238): at android.app.Activity.startActivity(Activity.java:2855)
02-13 11:07:33.225: E/AndroidRuntime(238): at android.preference.Preference.performClick(Preference.java:829)
02-13 11:07:33.225: E/AndroidRuntime(238): at android.preference.PreferenceScreen.onItemClick(PreferenceScreen.java:190)
02-13 11:07:33.225: E/AndroidRuntime(238): at android.widget.AdapterView.performItemClick(AdapterView.java:284)
02-13 11:07:33.225: E/AndroidRuntime(238): at android.widget.ListView.performItemClick(ListView.java:3285)
02-13 11:07:33.225: E/AndroidRuntime(238): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1640)
02-13 11:07:33.225: E/AndroidRuntime(238): at android.os.Handler.handleCallback(Handler.java:587)
02-13 11:07:33.225: E/AndroidRuntime(238): at android.os.Handler.dispatchMessage(Handler.java:92)
02-13 11:07:33.225: E/AndroidRuntime(238): at android.os.Looper.loop(Looper.java:123)
02-13 11:07:33.225: E/AndroidRuntime(238): at android.app.ActivityThread.main(ActivityThread.java:4363)
02-13 11:07:33.225: E/AndroidRuntime(238): at java.lang.reflect.Method.invokeNative(Native Method)
02-13 11:07:33.225: E/AndroidRuntime(238): at java.lang.reflect.Method.invoke(Method.java:521)
02-13 11:07:33.225: E/AndroidRuntime(238): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
02-13 11:07:33.225: E/AndroidRuntime(238): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
02-13 11:07:33.225: E/AndroidRuntime(238): at dalvik.system.NativeStart.main(Native Method)
I use android 1.5. I did not put specific entry in the manifest.
Anyone have an idea or an other method for call my market page?
Expanding on a previous comment, you can check if the Intent can be resolved on the device before starting a new Activity with it using code like this:
PackageManager pm = context.getPackageManager();
ComponentName cn = intent.resolveActivity(pm);
if (cn != null) {
this.startActivity(intent);
}
Try adding the following flat to your intent.
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
If you're running this code on the emulator, you should know that there is no Android Market application on the emulator, so it will throw you this exception. There should be no problem on most of the real devices. Hope this helps.
I have this code:
String sql="UPDATE LAST_OPEN SET LAST_OPEN="+DATE+" WHERE STUDENT_ID ="+STUDENT_ID+" AND ITEM_ID="+ITEM_ID+" AND ITEM_NAME="+ITEM_TYPE+";";
db.execSQL(sql);
Where LAST_OPEN field is timestamp.I tried to run the same query in SQlite Browser it was working fine.But when this Sql is executed in app it shows this:
02-13 13:12:39.468: E/AndroidRuntime(2366): FATAL EXCEPTION: main
02-13 13:12:39.468: E/AndroidRuntime(2366): android.database.sqlite.SQLiteException: near "13": syntax error: UPDATE LAST_OPEN SET LAST_OPEN=2012-02-13 13:12:39 WHERE STUDENT_ID =5 AND ITEM_ID=1 AND ITEM_NAME=Activity;
02-13 13:12:39.468: E/AndroidRuntime(2366): at android.database.sqlite.SQLiteDatabase.native_execSQL(Native Method)
-13 13:12:39.468: E/AndroidRuntime(2366): at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1727)
02-13 13:12:39.468: E/AndroidRuntime(2366): at com.cuelearn.databases.last_open.update(last_open.java:205)
02-13 13:12:39.468: E/AndroidRuntime(2366): at com.cuelearn.main.threeshelf$1.onClick(threeshelf.java:197)
02-13 13:12:39.468: E/AndroidRuntime(2366): at android.view.View.performClick(View.java:2408)
02-13 13:12:39.468: E/AndroidRuntime(2366): at android.view.View$PerformClick.run(View.java:8816)
02-13 13:12:39.468: E/AndroidRuntime(2366): at android.os.Handler.handleCallback(Handler.java:587)
02-13 13:12:39.468: E/AndroidRuntime(2366): at android.os.Handler.dispatchMessage(Handler.java:92)
02-13 13:12:39.468: E/AndroidRuntime(2366): at android.os.Looper.loop(Looper.java:123)
02-13 13:12:39.468: E/AndroidRuntime(2366): at android.app.ActivityThread.main(ActivityThread.java:4627)
02-13 13:12:39.468: E/AndroidRuntime(2366): at java.lang.reflect.Method.invokeNative(Native Method)
02-13 13:12:39.468: E/AndroidRuntime(2366): at java.lang.reflect.Method.invoke(Method.java:521)
02-13 13:12:39.468: E/AndroidRuntime(2366): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-13 13:12:39.468: E/AndroidRuntime(2366): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
Can anyone tell where I am getting wrong?
Try with this sql statement :
String sql="UPDATE LAST_OPEN SET LAST_OPEN='"+DATE+"' WHERE STUDENT_ID ="+STUDENT_ID+" AND ITEM_ID="+ITEM_ID+" AND ITEM_NAME="+ITEM_TYPE+";";
as I know, when you are using any string data in sql statement you need to add '' in the beginning of the variable and at the end of it.
Try to change
LAST_OPEN=2012-02-13 13:12:39
with
LAST_OPEN = "2012-02-13 13:12:39"
The space between the numbers can be the problem. Hope this helps.