My App is run correctly in simulator but when i try to run in device .i will not give me error
please try to solve this problem
07-10 02:56:34.022: D/AndroidRuntime(28052): Shutting down VM
07-10 02:56:34.022: W/dalvikvm(28052): threadid=1: thread exiting with uncaught exception (group=0x40a551f8)
07-10 02:56:34.022: E/AndroidRuntime(28052): FATAL EXCEPTION: main
07-10 02:56:34.022: E/AndroidRuntime(28052): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.mobileTimerClock/com.android.mobileTimerClock.TimeClockDashBoard}: java.lang.NullPointerException: println needs a message
07-10 02:56:34.022: E/AndroidRuntime(28052): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
07-10 02:56:34.022: E/AndroidRuntime(28052): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
07-10 02:56:34.022: E/AndroidRuntime(28052): at android.app.ActivityThread.access$600(ActivityThread.java:123)
07-10 02:56:34.022: E/AndroidRuntime(28052): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
07-10 02:56:34.022: E/AndroidRuntime(28052): at android.os.Handler.dispatchMessage(Handler.java:99)
07-10 02:56:34.022: E/AndroidRuntime(28052): at android.os.Looper.loop(Looper.java:137)
07-10 02:56:34.022: E/AndroidRuntime(28052): at android.app.ActivityThread.main(ActivityThread.java:4424)
07-10 02:56:34.022: E/AndroidRuntime(28052): at java.lang.reflect.Method.invokeNative(Native Method)
07-10 02:56:34.022: E/AndroidRuntime(28052): at java.lang.reflect.Method.invoke(Method.java:511)
07-10 02:56:34.022: E/AndroidRuntime(28052): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-10 02:56:34.022: E/AndroidRuntime(28052): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-10 02:56:34.022: E/AndroidRuntime(28052): at dalvik.system.NativeStart.main(Native Method)
07-10 02:56:34.022: E/AndroidRuntime(28052): Caused by: java.lang.NullPointerException: println needs a message
07-10 02:56:34.022: E/AndroidRuntime(28052): at android.util.Log.println_native(Native Method)
07-10 02:56:34.022: E/AndroidRuntime(28052): at android.util.Log.i(Log.java:159)
07-10 02:56:34.022: E/AndroidRuntime(28052): at com.android.mobileTimerClock.TimeClockDashBoard.onCreate(TimeClockDashBoard.java:394)
07-10 02:56:34.022: E/AndroidRuntime(28052): at android.app.Activity.performCreate(Activity.java:4465)
07-10 02:56:34.022: E/AndroidRuntime(28052): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
07-10 02:56:34.022: E/AndroidRuntime(28052): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
07-10 02:56:34.022: E/AndroidRuntime(28052): ... 11 more
07-10 02:56:34.022: W/ActivityManager(177): Force finishing activity com.android.mobileTimerClock/.TimeClockDashBoard
07-10 02:56:34.030: W/ActivityManager(177): Force finishing activity com.android.mobileTimerClock/.DashBoard
07-10 02:56:34.530: W/ActivityManager(177): Activity pause timeout for ActivityRecord{41d0a690 com.android.mobileTimerClock/.TimeClockDashBoard}
My guess would be that you're passing null as the second parameter to a Log.i(String, String) call (or similar Log.*() method):
java.lang.NullPointerException: println needs a message
Related
07-10 08:32:43.863: E/AndroidRuntime(718): FATAL EXCEPTION: main
07-10 08:32:43.863: E/AndroidRuntime(718): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.burp/com.example.burp.MainActivity}: java.lang.ClassNotFoundException: com.example.burp.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.example.burp-2.apk]
07-10 08:32:43.863: E/AndroidRuntime(718): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
07-10 08:32:43.863: E/AndroidRuntime(718): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
07-10 08:32:43.863: E/AndroidRuntime(718): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
07-10 08:32:43.863: E/AndroidRuntime(718): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
07-10 08:32:43.863: E/AndroidRuntime(718): at android.os.Handler.dispatchMessage(Handler.java:99)
07-10 08:32:43.863: E/AndroidRuntime(718): at android.os.Looper.loop(Looper.java:123)
07-10 08:32:43.863: E/AndroidRuntime(718): at android.app.ActivityThread.main(ActivityThread.java:3683)
07-10 08:32:43.863: E/AndroidRuntime(718): at java.lang.reflect.Method.invokeNative(Native Method)
07-10 08:32:43.863: E/AndroidRuntime(718): at java.lang.reflect.Method.invoke(Method.java:507)
07-10 08:32:43.863: E/AndroidRuntime(718): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
07-10 08:32:43.863: E/AndroidRuntime(718): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
07-10 08:32:43.863: E/AndroidRuntime(718): at dalvik.system.NativeStart.main(Native Method)
07-10 08:32:43.863: E/AndroidRuntime(718): Caused by: java.lang.ClassNotFoundException: com.example.burp.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.example.burp-2.apk]
07-10 08:32:43.863: E/AndroidRuntime(718): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
07-10 08:32:43.863: E/AndroidRuntime(718): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
07-10 08:32:43.863: E/AndroidRuntime(718): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
07-10 08:32:43.863: E/AndroidRuntime(718): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
07-10 08:32:43.863: E/AndroidRuntime(718): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
07-10 08:32:43.863: E/AndroidRuntime(718): ... 11 more
how do I solve this problem? I am using Windows 7
Include your Activity in Manifest file. Like this
<activity
android:name=".application's starting activity" <!-- (.)dot means current dir, if your activity is in another package then give full package name ex: com.xxx.Activity -->
android:label="LABEL FOR ACTIVITY "
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
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.
I have used ZBAR library to scan bar code in my Application.
And I got this error log while opening camera on Samsung Galaxy S3 :
java.lang.RuntimeException: startPreview failed
at android.hardware.Camera.startPreview(Native Method)
at com.SGID.MainApp.ScanningFragment.engageCamera(ScanningFragment.java:184)
at com.SGID.MainApp.ScanningFragment.access$10(ScanningFragment.java:154)
at com.SGID.MainApp.ScanningFragment$4.run(ScanningFragment.java:111)
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:4898)
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:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
java.lang.RuntimeException: Unable to start activity ComponentInfo
{com.SGID.MainApp/com.SGID.MainApp.AllTabsActivity}
: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2100)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
at android.app.ActivityThread.access$600(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
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:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.SGID.MainApp.ParametersFragment.onCreateView(ParametersFragment.java:78)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1478)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:927)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1086)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:1877)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:552)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1167)
at android.app.Activity.performStart(Activity.java:5216)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2073)
... 11 more
EDIT :
Getting error at this line :
CameraPreview mPreview = new CameraPreview(getActivity(), mCamera, previewCb,
autoFocusCB);
Can Anyone help me to resolve this error??
Thanks in advance..
I have followed all the steps described here
add doesn't appear but when i touch the add area it gives me NPE
07-10 15:37:20.564: E/AndroidRuntime(715): FATAL EXCEPTION: main
07-10 15:37:20.564: E/AndroidRuntime(715): java.lang.NullPointerException
07-10 15:37:20.564: E/AndroidRuntime(715): at com.millennialmedia.android.MMAdView.onTouchEvent(MMAdView.java:631)
07-10 15:37:20.564: E/AndroidRuntime(715): at android.view.View.dispatchTouchEvent(View.java:3766)
07-10 15:37:20.564: E/AndroidRuntime(715): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:897)
07-10 15:37:20.564: E/AndroidRuntime(715): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936)
07-10 15:37:20.564: E/AndroidRuntime(715): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936)
07-10 15:37:20.564: E/AndroidRuntime(715): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936)
07-10 15:37:20.564: E/AndroidRuntime(715): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936)
07-10 15:37:20.564: E/AndroidRuntime(715): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1671)
07-10 15:37:20.564: E/AndroidRuntime(715): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
07-10 15:37:20.564: E/AndroidRuntime(715): at android.app.Activity.dispatchTouchEvent(Activity.java:2086)
07-10 15:37:20.564: E/AndroidRuntime(715): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1655)
07-10 15:37:20.564: E/AndroidRuntime(715): at android.view.ViewRoot.handleMessage(ViewRoot.java:1785)
07-10 15:37:20.564: E/AndroidRuntime(715): at android.os.Handler.dispatchMessage(Handler.java:99)
07-10 15:37:20.564: E/AndroidRuntime(715): at android.os.Looper.loop(Looper.java:123)
07-10 15:37:20.564: E/AndroidRuntime(715): at android.app.ActivityThread.main(ActivityThread.java:4627)
07-10 15:37:20.564: E/AndroidRuntime(715): at java.lang.reflect.Method.invokeNative(Native Method)
07-10 15:37:20.564: E/AndroidRuntime(715): at java.lang.reflect.Method.invoke(Method.java:521)
07-10 15:37:20.564: E/AndroidRuntime(715): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-10 15:37:20.564: E/AndroidRuntime(715): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-10 15:37:20.564: E/AndroidRuntime(715): at dalvik.system.NativeStart.main(Native Method)
calling my add from onCreate
Hashtable<String, String> map = new Hashtable<String, String>();
map.put("age", "45");
map.put("zip", "90210");
map.put("income", "50000");
LinearLayout myLayout = (LinearLayout) findViewById(R.id.layoutadd);
adview = new MMAdView(Result.this, MYAPID, MMAdView.BANNER_AD_BOTTOM, 30,map);//(Result.this, MYAPID,"MMBannerAdBottom", 30,false);
adview.setId(MMAdViewSDK.DEFAULT_VIEWID + 1);
myLayout.addView(adview, new LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT));
MMAdListener listener = new MyAdListener();
adview.setListener(new com.millennialmedia.android.BasicMMAdListener());//listener);
adview.callForAd();
Note: this thing happens with latest millennial media only. older version says no add return in logcat and continues to work.
EDIT: after lots of things i moved to xml and it was working like champ. now i think problem with java code is adview was not added to view properly and hence touching the space of ad was giving the NPE. Can any one tell more about this?
I have an android application and am trying to test the installation by downloading from a URL. The app is developed by me and I can load the app into emulator using eclipse and run it properly.
I uploaded the apk to webserver and point the emulators android browser to the location http://localhost:9080/myapp.apk. Emulator downloads the app properly. When I try to click on the downloaded file to install, it throws an error saying Unfortunately the process android.process.media has stopped. I am not sure how to proceed further to resolve this issue
Emulator Configuration: Android avd running on API 14, ICS 4.0.0 with 1GB sdcard.iso
Appreciate any insights.
Logcat shows the following:
07-10 19:17:19.195: I/qtaguid(380): Untagging socket 65 failed errno=-2
07-10 19:17:19.195: W/NetworkManagementSocketTagger(380): untagSocket(65) failed with errno -2
07-10 19:17:19.624: D/dalvikvm(80): GC_CONCURRENT freed 398K, 10% free 12133K/13383K, paused 10ms+10ms
07-10 19:17:20.174: D/dalvikvm(147): GC_CONCURRENT freed 699K, 31% free 11440K/16455K, paused 4ms+8ms
07-10 19:17:20.734: D/dalvikvm(147): GC_CONCURRENT freed 535K, 32% free 11325K/16455K, paused 3ms+7ms
07-10 19:17:21.025: D/dalvikvm(80): GC_EXPLICIT freed 105K, 10% free 12084K/13383K, paused 5ms+11ms
07-10 19:17:21.484: D/dalvikvm(380): GC_CONCURRENT freed 373K, 5% free 10112K/10631K, paused 4ms+5ms
07-10 19:17:24.464: W/KeyguardViewMediator(80): verifyUnlock called when not externally disabled
07-10 19:17:24.594: W/dalvikvm(380): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Landroid/drm/DrmManagerClient;
07-10 19:17:24.604: D/AndroidRuntime(380): Shutting down VM
07-10 19:17:24.614: W/dalvikvm(380): threadid=1: thread exiting with uncaught exception (group=0x409961f8)
07-10 19:17:24.654: E/AndroidRuntime(380): FATAL EXCEPTION: main
07-10 19:17:24.654: E/AndroidRuntime(380): java.lang.ExceptionInInitializerError
07-10 19:17:24.654: E/AndroidRuntime(380): at com.android.providers.downloads.DownloadDrmHelper.getOriginalMimeType(DownloadDrmHelper.java:97)
07-10 19:17:24.654: E/AndroidRuntime(380): at com.android.providers.downloads.DownloadReceiver.openDownload(DownloadReceiver.java:153)
07-10 19:17:24.654: E/AndroidRuntime(380): at com.android.providers.downloads.DownloadReceiver.handleNotificationBroadcast(DownloadReceiver.java:104)
07-10 19:17:24.654: E/AndroidRuntime(380): at com.android.providers.downloads.DownloadReceiver.onReceive(DownloadReceiver.java:74)
07-10 19:17:24.654: E/AndroidRuntime(380): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2118)
07-10 19:17:24.654: E/AndroidRuntime(380): at android.app.ActivityThread.access$1500(ActivityThread.java:122)
07-10 19:17:24.654: E/AndroidRuntime(380): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
07-10 19:17:24.654: E/AndroidRuntime(380): at android.os.Handler.dispatchMessage(Handler.java:99)
07-10 19:17:24.654: E/AndroidRuntime(380): at android.os.Looper.loop(Looper.java:137)
07-10 19:17:24.654: E/AndroidRuntime(380): at android.app.ActivityThread.main(ActivityThread.java:4340)
07-10 19:17:24.654: E/AndroidRuntime(380): at java.lang.reflect.Method.invokeNative(Native Method)
07-10 19:17:24.654: E/AndroidRuntime(380): at java.lang.reflect.Method.invoke(Method.java:511)
07-10 19:17:24.654: E/AndroidRuntime(380): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-10 19:17:24.654: E/AndroidRuntime(380): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-10 19:17:24.654: E/AndroidRuntime(380): at dalvik.system.NativeStart.main(Native Method)
07-10 19:17:24.654: E/AndroidRuntime(380): Caused by: java.lang.UnsatisfiedLinkError: Library drmframework_jni not found; tried [/vendor/lib/libdrmframework_jni.so, /system/lib/libdrmframework_jni.so]
07-10 19:17:24.654: E/AndroidRuntime(380): at java.lang.Runtime.loadLibrary(Runtime.java:393)
07-10 19:17:24.654: E/AndroidRuntime(380): at java.lang.System.loadLibrary(System.java:535)
07-10 19:17:24.654: E/AndroidRuntime(380): at android.drm.DrmManagerClient.<clinit>(DrmManagerClient.java:56)
07-10 19:17:24.654: E/AndroidRuntime(380): ... 15 more
07-10 19:17:24.804: W/InputManagerService(80): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#41647c30
07-10 19:17:25.044: I/WindowManager(80): createSurface Window{415ef168 paused=false}: DRAW NOW PENDING
Apparently its a bug in Android as pointed by #SevaAlekseyev above
code.google.com/p/android/issues/detail?id=21173
I was able to install by clicking on the app from downloads
Resolved in 4.1 (API 16). I get the same error because of an unsatisfied link error, libdrmframework_jni.so. Works well on a device.