05-10 22:12:43.572: E/dalvikvm(566): Could not find class 'com.commonsware.cwac.merge.MergeAdapter', referenced from method FXPAL.Unity.Android.UnityMain.updateView
05-10 22:12:43.862: E/dalvikvm(566): Could not find class 'com.xtify.android.sdk.PersistentLocationManager', referenced from method FXPAL.Unity.Android.ReportingService.onCreate
05-10 22:12:44.182: E/AndroidRuntime(566): FATAL EXCEPTION: main
05-10 22:12:44.182: E/AndroidRuntime(566): java.lang.NoClassDefFoundError: com.xtify.android.sdk.PersistentLocationManager
05-10 22:12:44.182: E/AndroidRuntime(566): at FXPAL.Unity.Android.ReportingService.onCreate(ReportingService.java:240)
05-10 22:12:44.182: E/AndroidRuntime(566): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2253)
05-10 22:12:44.182: E/AndroidRuntime(566): at android.app.ActivityThread.access$1600(ActivityThread.java:123)
05-10 22:12:44.182: E/AndroidRuntime(566): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1201)
05-10 22:12:44.182: E/AndroidRuntime(566): at android.os.Handler.dispatchMessage(Handler.java:99)
05-10 22:12:44.182: E/AndroidRuntime(566): at android.os.Looper.loop(Looper.java:137)
05-10 22:12:44.182: E/AndroidRuntime(566): at android.app.ActivityThread.main(ActivityThread.java:4424)
05-10 22:12:44.182: E/AndroidRuntime(566): at java.lang.reflect.Method.invokeNative(Native Method)
05-10 22:12:44.182: E/AndroidRuntime(566): at java.lang.reflect.Method.invoke(Method.java:511)
05-10 22:12:44.182: E/AndroidRuntime(566): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-10 22:12:44.182: E/AndroidRuntime(566): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-10 22:12:44.182: E/AndroidRuntime(566): at dalvik.system.NativeStart.main(Native Method)
05-10 22:12:55.702: E/dalvikvm(589): Could not find class 'com.xtify.android.sdk.PersistentLocationManager', referenced from method FXPAL.Unity.Android.ReportingService.onCreate
05-10 22:12:55.992: E/AndroidRuntime(589): FATAL EXCEPTION: main
05-10 22:12:55.992: E/AndroidRuntime(589): java.lang.NoClassDefFoundError: com.xtify.android.sdk.PersistentLocationManager
05-10 22:12:55.992: E/AndroidRuntime(589): at FXPAL.Unity.Android.ReportingService.onCreate(ReportingService.java:240)
05-10 22:12:55.992: E/AndroidRuntime(589): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2253)
05-10 22:12:55.992: E/AndroidRuntime(589): at android.app.ActivityThread.access$1600(ActivityThread.java:123)
05-10 22:12:55.992: E/AndroidRuntime(589): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1201)
05-10 22:12:55.992: E/AndroidRuntime(589): at android.os.Handler.dispatchMessage(Handler.java:99)
05-10 22:12:55.992: E/AndroidRuntime(589): at android.os.Looper.loop(Looper.java:137)
05-10 22:12:55.992: E/AndroidRuntime(589): at android.app.ActivityThread.main(ActivityThread.java:4424)
05-10 22:12:55.992: E/AndroidRuntime(589): at java.lang.reflect.Method.invokeNative(Native Method)
05-10 22:12:55.992: E/AndroidRuntime(589): at java.lang.reflect.Method.invoke(Method.java:511)
05-10 22:12:55.992: E/AndroidRuntime(589): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-10 22:12:55.992: E/AndroidRuntime(589): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-10 22:12:55.992: E/AndroidRuntime(589): at dalvik.system.NativeStart.main(Native Method)
05-10 22:13:01.262: E/dalvikvm(605): Could not find class 'com.commonsware.cwac.merge.MergeAdapter', referenced from method FXPAL.Unity.Android.UnityMain.updateView
05-10 22:13:01.502: E/dalvikvm(605): Could not find class 'com.xtify.android.sdk.PersistentLocationManager', referenced from method FXPAL.Unity.Android.ReportingService.onCreate
05-10 22:13:01.722: E/AndroidRuntime(605): FATAL EXCEPTION: main
05-10 22:13:01.722: E/AndroidRuntime(605): java.lang.NoClassDefFoundError: com.xtify.android.sdk.PersistentLocationManager
05-10 22:13:01.722: E/AndroidRuntime(605): at FXPAL.Unity.Android.ReportingService.onCreate(ReportingService.java:240)
05-10 22:13:01.722: E/AndroidRuntime(605): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2253)
05-10 22:13:01.722: E/AndroidRuntime(605): at android.app.ActivityThread.access$1600(ActivityThread.java:123)
05-10 22:13:01.722: E/AndroidRuntime(605): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1201)
05-10 22:13:01.722: E/AndroidRuntime(605): at android.os.Handler.dispatchMessage(Handler.java:99)
05-10 22:13:01.722: E/AndroidRuntime(605): at android.os.Looper.loop(Looper.java:137)
05-10 22:13:01.722: E/AndroidRuntime(605): at android.app.ActivityThread.main(ActivityThread.java:4424)
05-10 22:13:01.722: E/AndroidRuntime(605): at java.lang.reflect.Method.invokeNative(Native Method)
05-10 22:13:01.722: E/AndroidRuntime(605): at java.lang.reflect.Method.invoke(Method.java:511)
05-10 22:13:01.722: E/AndroidRuntime(605): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-10 22:13:01.722: E/AndroidRuntime(605): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-10 22:13:01.722: E/AndroidRuntime(605): at dalvik.system.NativeStart.main(Native Method)
I am new to android development.I am upgrading an android application from 2.2 Android to 4.0.3. The application is not starting and saying "Unfortunately myUnity application has stopped", but previously the application was good.The above is the error log i am getting while I debug the application.I am also pasting my manifest file below. Please help me out guys as I am facing this problem since many days.
Thanks in advance.
Android manifest file is
-->
Thanks in advance.... i am also new to stackflow... i am really sorry if I posted the question in wrong format.
Regards,
Rakesh.
LogCat
05-15 06:52:35.898: E/dalvikvm(1436): Could not find class 'com.commonsware.cwac.merge.MergeAdapter', referenced from method FXPAL.Unity.Android.UnityMain.updateView
05-15 06:52:36.187: E/dalvikvm(1436): Could not find class 'com.xtify.android.sdk.PersistentLocationManager', referenced from method FXPAL.Unity.Android.ReportingService.onCreate
The above is my logcat. Looking forward to your help guyz. The below is my android Manifest
Well I had made changes in my Android Environment. I was using some external libraries (JARs) and I was also getting this "NoClassDef" error. I made a folder by name of "libs" copied the libraries into it. Right clicked on "libs" then buildpath -> add as source folder.
I hope this helps :)
Your problem is `
java.lang.NoClassDefFoundError: com.xtify.android.sdk.PersistentLocationManager
`
Copied from documentation:
Thrown if the Java Virtual Machine or a ClassLoader instance tries to
load in the definition of a class (as part of a normal method call or
as part of creating a new instance using the new expression) and no
definition of the class could be found. The searched-for class
definition existed when the currently executing class was compiled,
but the definition can no longer be found.
Reason of NoClassDefFoundError is that a particular class is not available in Classpath, so u need to add that into Classpath. Try it.
No apologies needed, posting the logcat is the right thing to do. The first line says "Could not find class 'com.commonsware.cwac.merge.MergeAdapter', referenced from method FXPAL.Unity.Android.UnityMain.updateView". Be sure you are still linking that package into your app.
BTW, I can't see your manifest file.
Related
when I import the viewpagerindicator project library into my application that works without the support library, it crashes on launch. I've tried it with more than one application with the same results. Here is the logcat output:
06-14 17:19:02.351: E/AndroidRuntime(589): FATAL EXCEPTION: main
06-14 17:19:02.351: E/AndroidRuntime(589): Process: com.example.android.navigationdrawerexample, PID: 589
06-14 17:19:02.351: E/AndroidRuntime(589): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.android.navigationdrawerexample/com.example.android.navigationdrawerexample.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.android.navigationdrawerexample.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.android.navigationdrawerexample-9.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.android.navigationdrawerexample-9, /vendor/lib, /system/lib]]
06-14 17:19:02.351: E/AndroidRuntime(589): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2231)
06-14 17:19:02.351: E/AndroidRuntime(589): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2363)
06-14 17:19:02.351: E/AndroidRuntime(589): at android.app.ActivityThread.access$900(ActivityThread.java:161)
06-14 17:19:02.351: E/AndroidRuntime(589): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
06-14 17:19:02.351: E/AndroidRuntime(589): at android.os.Handler.dispatchMessage(Handler.java:102)
06-14 17:19:02.351: E/AndroidRuntime(589): at android.os.Looper.loop(Looper.java:157)
06-14 17:19:02.351: E/AndroidRuntime(589): at android.app.ActivityThread.main(ActivityThread.java:5356)
06-14 17:19:02.351: E/AndroidRuntime(589): at java.lang.reflect.Method.invokeNative(Native Method)
06-14 17:19:02.351: E/AndroidRuntime(589): at java.lang.reflect.Method.invoke(Method.java:515)
06-14 17:19:02.351: E/AndroidRuntime(589): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
06-14 17:19:02.351: E/AndroidRuntime(589): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
06-14 17:19:02.351: E/AndroidRuntime(589): at dalvik.system.NativeStart.main(Native Method)
06-14 17:19:02.351: E/AndroidRuntime(589): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.android.navigationdrawerexample.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.android.navigationdrawerexample-9.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.android.navigationdrawerexample-9, /vendor/lib, /system/lib]]
06-14 17:19:02.351: E/AndroidRuntime(589): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:67)
06-14 17:19:02.351: E/AndroidRuntime(589): at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
06-14 17:19:02.351: E/AndroidRuntime(589): at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
06-14 17:19:02.351: E/AndroidRuntime(589): at android.app.Instrumentation.newActivity(Instrumentation.java:1079)
06-14 17:19:02.351: E/AndroidRuntime(589): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2222)
06-14 17:19:02.351: E/AndroidRuntime(589): ... 11 more
So it turns out that the problem was that all of my android-support-v4.jar library files were different. So all I did was copied the latest v4 .jar files into the "libs" folder of both my project and library, added it to the build path, and voilĂ no more crashes!
I've made my Android app tablet optimized and I followed the tutorial here:
Everything is great, but I am trying to select an item (say, the 1st item) with a button in the ActionBar.
I tried this answer to use performItemClick but on I've got error reports of java.lang.IllegalStateException
in android.support.v4.app.ListFragment.ensureList, java.lang.IllegalStateException: Content view not yet created, and java.lang.NullPointerException
in android.content.ComponentName.<init>
I've tried checking if the ListView is null and still get the error reports on the Play Store. How do I properly select an item in my list programmatically?
Update to add logcat and the code is virtually identical to the tutorials in the links:
Logcat A:
java.lang.IllegalStateException: Content view not yet created
at android.support.v4.app.ListFragment.ensureList(ListFragment.java:328)
at android.support.v4.app.ListFragment.getListView(ListFragment.java:222)
at com.ccwilcox.meteorshower.MeteorList.showMeteorDetails(MeteorList.java:69)
at com.ccwilcox.meteorshower.MeteorList.onListItemClick(MeteorList.java:62)
at android.support.v4.app.ListFragment$2.onItemClick(ListFragment.java:58)
at android.widget.AdapterView.performItemClick(AdapterView.java:298)
at android.widget.AbsListView.performItemClick(AbsListView.java:1280)
at com.ccwilcox.meteorshower.MainActivity.viewUpcomingEvent(MainActivity.java:648)
at com.ccwilcox.meteorshower.MainActivity.onOptionsItemSelected(MainActivity.java:534)
at android.app.Activity.onMenuItemSelected(Activity.java:2606)
at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:361)
at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:1045)
at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:735)
at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:149)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:874)
at com.android.internal.view.menu.ActionMenuView.invokeItem(ActionMenuView.java:592)
at com.android.internal.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:149)
at android.view.View.performClick(View.java:4222)
at android.view.View$PerformClick.run(View.java:17273)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4895)
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:994)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
at dalvik.system.NativeStart.main(Native Method)
Logcat B:
java.lang.NullPointerException
at android.content.ComponentName.<init>(ComponentName.java:75)
at android.content.Intent.<init>(Intent.java:2874)
at com.ccwilcox.meteorshower.MeteorList.showMeteorDetails(MeteorList.java:86)
at com.ccwilcox.meteorshower.MeteorList.onListItemClick(MeteorList.java:62)
at android.support.v4.app.ListFragment$2.onItemClick(ListFragment.java:58)
at android.widget.AdapterView.performItemClick(AdapterView.java:284)
at android.widget.ListView.performItemClick(ListView.java:3701)
at com.ccwilcox.meteorshower.MainActivity.viewUpcomingEvent(MainActivity.java:648)
at com.ccwilcox.meteorshower.MainActivity.onOptionsItemSelected(MainActivity.java:534)
at android.app.Activity.onMenuItemSelected(Activity.java:2205)
at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:361)
at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:779)
at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:143)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:861)
at com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java:532)
at com.android.internal.view.menu.IconMenuItemView.performClick(IconMenuItemView.java:122)
at android.view.View$PerformClick.run(View.java:9152)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
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:842)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Update 2
And here is the code that is causing the problem:
if (mListFragment.listView != null) {
mListFragment.listView.performItemClick(mListFragment.listView.getAdapter().getView(position, null, null), position, mListFragment.listView.getAdapter().getItemId(position));
}
I make app in android with scheduled task and running in background, but when i open other app and do it something with my device,then i back to my app to check the task,the task is stopped. i have logcat like this,does somebody now what i'm doing wrong??
05-10 17:55:14.520: W/GpsLocationProvider(149): Unneeded remove listener for uid 1000
05-10 17:55:14.650: W/ActivityManager(149): Scheduling restart of crashed service com.sec.chaton/.push.PushClientService in 5000ms
05-10 17:55:15.740: E/ActivityThread(9192): Failed to find provider info for ownhere.google.settings
05-10 17:55:15.750: E/ActivityThread(9192): Failed to find provider info for ownhere.google.settings
05-10 17:55:15.790: E/ActivityThread(9192): Failed to find provider info for ownhere.google.settings
05-10 17:55:15.790: E/ActivityThread(9192): Failed to find provider info for ownhere.google.settings
05-10 17:55:16.580: W/ActivityManager(149): Scheduling restart of crashed service com.staircase3.opensignal/.library.Background_scan in 5000ms
05-10 17:55:21.680: E/API(9280): 15
05-10 17:55:21.700: E/Background_scan(9280): Tab_Overview.overview_visible=false;
05-10 17:55:34.990: W/ActivityManager(149): startActivity called from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: Intent { cmp=com.firstwap.celltrack/.MainActivity bnds=[834,488][1264,552] }
05-10 17:55:35.030: W/KeyguardViewMediator(149): verifyUnlock called when not externally disabled
05-10 17:55:35.140: W/ActivityManager(149): Force removing ActivityRecord{414b2478 com.firstwap.celltrack/.MainActivity}: app died, no saved state
05-10 17:55:35.250: W/GpsLocationProvider(149): Duplicate add listener for uid 10012
05-10 17:55:35.350: E/LWUIT(9312): problem with setHasAlpha
05-10 17:55:35.350: E/LWUIT(9312): java.lang.NoSuchMethodException: setHasAlpha [class java.lang.Boolean]
05-10 17:55:35.350: E/LWUIT(9312): at java.lang.Class.getConstructorOrMethod(Class.java:460)
05-10 17:55:35.350: E/LWUIT(9312): at java.lang.Class.getMethod(Class.java:915)
05-10 17:55:35.350: E/LWUIT(9312): at com.sun.lwuit.impl.android.AndroidView.initBitmaps(AndroidView.java:151)
05-10 17:55:35.350: E/LWUIT(9312): at com.sun.lwuit.impl.android.AndroidView.<init>(AndroidView.java:132)
05-10 17:55:35.350: E/LWUIT(9312): at com.sun.lwuit.impl.android.AndroidImplementation$1.run(AndroidImplementation.java:244)
05-10 17:55:35.350: E/LWUIT(9312): at com.sun.lwuit.impl.android.AndroidImplementation$12.run(AndroidImplementation.java:2155)
05-10 17:55:35.350: E/LWUIT(9312): at android.app.Activity.runOnUiThread(Activity.java:4170)
05-10 17:55:35.350: E/LWUIT(9312): at com.sun.lwuit.impl.android.AndroidImplementation.runOnAndroidUIThreadAndWait(AndroidImplementation.java:2151)
05-10 17:55:35.350: E/LWUIT(9312): at com.sun.lwuit.impl.android.AndroidImplementation.runOnAndroidUIThreadAndWait(AndroidImplementation.java:2144)
05-10 17:55:35.350: E/LWUIT(9312): at com.sun.lwuit.impl.android.AndroidImplementation.initSurface(AndroidImplementation.java:238)
05-10 17:55:35.350: E/LWUIT(9312): at com.sun.lwuit.impl.android.AndroidImplementation.init(AndroidImplementation.java:179)
05-10 17:55:35.350: E/LWUIT(9312): at com.sun.lwuit.Display.init(Display.java:423)
05-10 17:55:35.350: E/LWUIT(9312): at com.firstwap.celltrack.MobileCellTrackActivity.onCreate(MobileCellTrackActivity.java:173)
05-10 17:55:35.350: E/LWUIT(9312): at android.app.Activity.performCreate(Activity.java:4465)
05-10 17:55:35.350: E/LWUIT(9312): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
05-10 17:55:35.350: E/LWUIT(9312): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
05-10 17:55:35.350: E/LWUIT(9312): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
05-10 17:55:35.350: E/LWUIT(9312): at android.app.ActivityThread.access$600(ActivityThread.java:123)
05-10 17:55:35.350: E/LWUIT(9312): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
05-10 17:55:35.350: E/LWUIT(9312): at android.os.Handler.dispatchMessage(Handler.java:99)
05-10 17:55:35.350: E/LWUIT(9312): at android.os.Looper.loop(Looper.java:137)
05-10 17:55:35.350: E/LWUIT(9312): at android.app.ActivityThread.main(ActivityThread.java:4424)
05-10 17:55:35.350: E/LWUIT(9312): at java.lang.reflect.Method.invokeNative(Native Method)
05-10 17:55:35.350: E/LWUIT(9312): at java.lang.reflect.Method.invoke(Method.java:511)
05-10 17:55:35.350: E/LWUIT(9312): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-10 17:55:35.350: E/LWUIT(9312): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-10 17:55:35.350: E/LWUIT(9312): at dalvik.system.NativeStart.main(Native Method)
05-10 17:55:44.440: W/InputManagerService(149): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#4164f0b0
05-10 17:55:47.510: W/InputManagerService(149): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy#416f80f0 (uid=10012 pid=9312)
It's a crash issue (NoSuchMethodException).
Logs:
05-10 17:55:35.350: E/LWUIT(9312): problem with setHasAlpha
05-10 17:55:35.350: E/LWUIT(9312): java.lang.NoSuchMethodException: setHasAlpha [class java.lang.Boolean]
I use the next tutorial, in developer.android.com :
http://developer.android.com/training/camera/photobasics.html
with API 2.1
When I click in take a small picture, no problem
When I click in take a small picture and after I click in take a big picture, no problem
But, when I click directly in big picture, I take a picture and my app crash ...
In LogCat :
05-10 09:26:30.773: D/CameraSample(3407): failed to create directory
05-10 09:26:33.713: W/IInputConnectionWrapper(3407): showStatusIcon on inactive InputConnection
05-10 09:26:45.883: I/Parcours(3407): handleBigCameraPhoto
05-10 09:26:46.133: D/dalvikvm(3407): GC_EXTERNAL_ALLOC freed 124K, 52% free 2628K/5379K, external 1685K/2133K, paused 207ms
05-10 09:26:46.143: E/dalvikvm-heap(3407): 31961088-byte external allocation too large for this process.
05-10 09:26:46.163: E/GraphicsJNI(3407): VM won't let us allocate 31961088 bytes
05-10 09:26:46.213: D/dalvikvm(3407): GC_FOR_MALLOC freed 2K, 52% free 2625K/5379K, external 1685K/2133K, paused 55ms
05-10 09:26:46.213: D/skia(3407): --- decoder->decode returned false
05-10 09:26:46.213: D/AndroidRuntime(3407): Shutting down VM
05-10 09:26:46.223: W/dalvikvm(3407): threadid=1: thread exiting with uncaught exception (group=0x4001d560)
05-10 09:26:46.223: E/AndroidRuntime(3407): FATAL EXCEPTION: main
05-10 09:26:46.223: E/AndroidRuntime(3407): java.lang.OutOfMemoryError: bitmap size exceeds VM budget
05-10 09:26:46.223: E/AndroidRuntime(3407): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
05-10 09:26:46.223: E/AndroidRuntime(3407): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:470)
05-10 09:26:46.223: E/AndroidRuntime(3407): at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:284)
05-10 09:26:46.223: E/AndroidRuntime(3407): at rdaquin.apps.takephoto.TakePhotoActivity.setPic(TakePhotoActivity.java:124)
05-10 09:26:46.223: E/AndroidRuntime(3407): at rdaquin.apps.takephoto.TakePhotoActivity.handleBigCameraPhoto(TakePhotoActivity.java:195)
05-10 09:26:46.223: E/AndroidRuntime(3407): at rdaquin.apps.takephoto.TakePhotoActivity.onActivityResult(TakePhotoActivity.java:281)
05-10 09:26:46.223: E/AndroidRuntime(3407): at android.app.Activity.dispatchActivityResult(Activity.java:3908)
05-10 09:26:46.223: E/AndroidRuntime(3407): at android.app.ActivityThread.deliverResults(ActivityThread.java:2549)
05-10 09:26:46.223: E/AndroidRuntime(3407): at android.app.ActivityThread.handleSendResult(ActivityThread.java:2595)
05-10 09:26:46.223: E/AndroidRuntime(3407): at android.app.ActivityThread.access$2000(ActivityThread.java:121)
05-10 09:26:46.223: E/AndroidRuntime(3407): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:973)
05-10 09:26:46.223: E/AndroidRuntime(3407): at android.os.Handler.dispatchMessage(Handler.java:99)
05-10 09:26:46.223: E/AndroidRuntime(3407): at android.os.Looper.loop(Looper.java:123)
05-10 09:26:46.223: E/AndroidRuntime(3407): at android.app.ActivityThread.main(ActivityThread.java:3701)
05-10 09:26:46.223: E/AndroidRuntime(3407): at java.lang.reflect.Method.invokeNative(Native Method)
05-10 09:26:46.223: E/AndroidRuntime(3407): at java.lang.reflect.Method.invoke(Method.java:507)
05-10 09:26:46.223: E/AndroidRuntime(3407): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862)
05-10 09:26:46.223: E/AndroidRuntime(3407): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
05-10 09:26:46.223: E/AndroidRuntime(3407): at dalvik.system.NativeStart.main(Native Method)
If have you need a code, ask me.
I do not understand why my application crashes, I feel that this is a memory problem but I do not know what to do.
So that when I do "take a small image" and "take a big picture" it works. But if I reload the application and that I "take a big picture" does not work
I think it's pretty obvious from the stack trace, which says you ran out of memory because you tried to allocate 32MB on the heap. You can't do that. Not surprising since this happens when you take a big picture. You can't put it in memory. Write it to storage.
I have added the Results class to the Android Manifest, so yes, you can cross that off the list.
Is it an error in the way I've set out the method?
package com.kenning.foreveralone;
import android.app.Activity;
import android.os.Bundle;
import android.widget.EditText;
import android.widget.TextView;
public class Results extends Activity{
EditText fbFriends;
TextView resulting;
String value;
#Override
public void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.rslt);
TextView resulting = (TextView) findViewById(R.id.result);
EditText fbFriends = (EditText) findViewById(R.id.noFacebookFriends);
String value = fbFriends.getText().toString();
resulting.setText("Your score is " + value);
}
}
When I start this class, it always seems to force close my app. Can anyone tell me what I'm doing wrong?
Here's the log cat:
04-08 20:05:24.169: E/AndroidRuntime(589): FATAL EXCEPTION: main
04-08 20:05:24.169: E/AndroidRuntime(589): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.kenning.foreveralone/com.kenning.foreveralone.Results}: java.lang.NullPointerException
04-08 20:05:24.169: E/AndroidRuntime(589): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
04-08 20:05:24.169: E/AndroidRuntime(589): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-08 20:05:24.169: E/AndroidRuntime(589): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
04-08 20:05:24.169: E/AndroidRuntime(589): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-08 20:05:24.169: E/AndroidRuntime(589): at android.os.Handler.dispatchMessage(Handler.java:99)
04-08 20:05:24.169: E/AndroidRuntime(589): at android.os.Looper.loop(Looper.java:123)
04-08 20:05:24.169: E/AndroidRuntime(589): at android.app.ActivityThread.main(ActivityThread.java:4627)
04-08 20:05:24.169: E/AndroidRuntime(589): at java.lang.reflect.Method.invokeNative(Native Method)
04-08 20:05:24.169: E/AndroidRuntime(589): at java.lang.reflect.Method.invoke(Method.java:521)
04-08 20:05:24.169: E/AndroidRuntime(589): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-08 20:05:24.169: E/AndroidRuntime(589): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
04-08 20:05:24.169: E/AndroidRuntime(589): at dalvik.system.NativeStart.main(Native Method)
04-08 20:05:24.169: E/AndroidRuntime(589): Caused by: java.lang.NullPointerException
04-08 20:05:24.169: E/AndroidRuntime(589): at com.kenning.foreveralone.Results.onCreate(Results.java:20)
04-08 20:05:24.169: E/AndroidRuntime(589): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-08 20:05:24.169: E/AndroidRuntime(589): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
04-08 20:05:24.169: E/AndroidRuntime(589): ... 11 more
It's a null pointer exception in onCreate, so why not try stepping through onCreate to see what variable is null?
That said, I'm guessing R.id.noFacebookFriends is not part of the R.layout.rslt.
You are getting a NullPointerException somewhere in your OnCreate. I am guessing that either the ids are wrong in your rslt.xml layout so result and fbFriends is null, or fbFriends doesn't have any text in it so getText() returns null.