I'm trying to build a live wallpaper by linking Unity to Android. I keep getting this error which happens inside the android code WallpaperManager. Anyone has any clue what is going on?
I'm using Unity 2019.2.21f1 and compile using a Unity tool from Asset Store link
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.WallpaperManager.notifyPid(boolean, int, java.lang.String)' on a null object reference
at android.service.wallpaper.WallpaperService$Engine.attach(WallpaperService.java:1326)
at android.service.wallpaper.WallpaperService$IWallpaperEngineWrapper.executeMessage(WallpaperService.java:1732)
at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:44)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8019)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
Related
I have a problem when using Firebase-auth to get OTP SMS. I get the following crash:
.RuntimeException: Unable to resume activity {id.app.android/com.google.firebase.auth.internal.RecaptchaActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.internal.firebase-auth-api.zzat com.google.android.gms.internal.firebase-auth-api.zzdk.zza()' on a null object reference
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4270)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4302)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2044)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7562)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.internal.firebase-auth-api.zzat com.google.android.gms.internal.firebase-auth-api.zzdk.zza()' on a null object reference
at com.google.firebase.auth.internal.zzk.zzb(com.google.firebase:firebase-auth##20.0.1:2)
at com.google.firebase.auth.internal.RecaptchaActivity.zzd(com.google.firebase:firebase-auth##20.0.1:10)
at com.google.android.gms.internal.firebase-auth-api.zzth.<init>(com.google.firebase:firebase-auth##20.0.1:13)
at com.google.firebase.auth.internal.RecaptchaActivity.onResume(com.google.firebase:firebase-auth##20.0.1:43)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1454)
at android.app.Activity.performResume(Activity.java:8050)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4260)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4302)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2044)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7562)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
I've added "implementation 'androidx.browser: browser: 1.3.0'" in gradle and api's & service settings in google cloud but it still doesn't work
Anyone can help me?
thanks..
I was reviewing the problem, I had it too, what I did was disable the backup copies of the phone on which I was testing. I uninstalled the application and reinstalled it from android studio and it worked. Given this, I think it is time to investigate the backups and how this affects the app
If someone could help us with this relationship I would be very grateful.
You can also change this in the android manifest and reinstall, I may not be right so I'm open to suggestions, but this worked for me.
(Text written by google translator)
I am trying to launch my app into Production on Google Playstore. I have used Flutter to create the app. But in the pre-launch report I am getting error:
Stacktrace:
java.lang.RuntimeException: Unable to destroy activity {com.stech.ebox_expenses/com.example.ebox_expenses.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.lifecycle.e.c(androidx.lifecycle.h)' on a null object reference
FATAL EXCEPTION: main
Process: com.stech.ebox_expenses, PID: 12391
java.lang.RuntimeException: Unable to destroy activity {com.stech.ebox_expenses/com.example.ebox_expenses.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.lifecycle.e.c(androidx.lifecycle.h)' on a null object reference
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4504)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4522)
at android.app.ActivityThread.-wrap5(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1697)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6647)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.lifecycle.e.c(androidx.lifecycle.h)' on a null object reference
at com.mr.flutter.plugin.filepicker.FilePickerPlugin.j(Unknown Source:21)
at com.mr.flutter.plugin.filepicker.FilePickerPlugin.e(Unknown Source:0)
at io.flutter.embedding.engine.c.h(Unknown Source:54)
at io.flutter.embedding.android.f.o(Unknown Source:58)
at io.flutter.embedding.android.e.G(Unknown Source:7)
at io.flutter.embedding.android.e.onDestroy(Unknown Source:11)
at android.app.Activity.performDestroy(Activity.java:7241)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1271)
at androidx.test.runner.MonitoringInstrumentation.callActivityOnDestroy(MonitoringInstrumentation.java:1)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4491)
... 9 more
I try to find anything discussing this and I found one Stackoverflow question which was recieved badly and downvoted; Here's a ref to the post. I am not to sure why this is happening and I am not sure whether it is external problem which I can fix or an internal bug.
When I downloaded the app from the Playstore when it was production, it displayed a white screen when I opened it and stayed like this. I am not sure if me getting this error is a result of that or not either.
Any help on the matter will be appreciated!
I have managed to fix both problems which I was having. I fixed the first problem of this error by updating file_picker library to version 2.10. The issue was fixed in version 2.0.12. I also fixed the second issue of the white screen in the app when it started by downgrading to: classpath 'com.android.tools.build:gradle:3.4.3'. Here's the reference to the post which helped me.
I have used camera2 API to record the video, it is working absolutely fine but having problem only on android 8.1.0
throwing the following exception :
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'android.hardware.camera2.CaptureRequest android.hardware.camera2.impl.CameraDeviceImpl$CaptureCallbackHolder.getRequest(int)' on a null object reference
at android.hardware.camera2.impl.CameraDeviceImpl$CameraDeviceCallbacks.onResultReceived(CameraDeviceImpl.java:1923)
at android.hardware.camera2.legacy.CameraDeviceUserShim$CameraCallbackThread$CallbackHandler.handleMessage(CameraDeviceUserShim.java:323)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:210)
at android.os.HandlerThread.run(HandlerThread.java:65)
I currently have an issue when I deploy my Titanium alloy application to the play store, when I launch it for the first time it crashes. This only happens in production.
When I reported the issue the following is what I found in the developer console:
java.lang.NullPointerException: Attempt to invoke virtual method
'android.content.res.Resources android.content.Context.getResources()'
on a null object reference at
android.view.ViewConfiguration.get(ViewConfiguration.java:359) at
android.view.View.(View.java:3663) at
android.view.View.(View.java:3758) at
android.widget.TextView.(TextView.java:650) at
android.widget.TextView.(TextView.java:645) at
android.widget.TextView.(TextView.java:641) at
android.widget.TextView.(TextView.java:637) at
ti.modules.titanium.ui.widget.TiUILabel$1.(TiUILabel.java:58)
at ti.modules.titanium.ui.widget.TiUILabel.(TiUILabel.java:57)
at ti.modules.titanium.ui.LabelProxy.createView(LabelProxy.java:63)
at
org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:490)
at
org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:476)
at
org.appcelerator.titanium.proxy.TiViewProxy.handleToImage(TiViewProxy.java:965)
at
org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:280)
at android.os.Handler.dispatchMessage(Handler.java:98) at
android.os.Looper.loop(Looper.java:211) at
android.app.ActivityThread.main(ActivityThread.java:5373) at
java.lang.reflect.Method.invoke(Native Method) at
java.lang.reflect.Method.invoke(Method.java:372) at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)
Since I don't know where excalty it went wrong since it is in production I don't know what code to supply. I understand it is a null reference error, but nowhere in my application I use a getResources() function, or something like that.
The second time I run it it just works
Titanium Version: 6.0.1.GA
Mac OS X: 10.12.3
Target android SDK: 23
Android version: 5.1
Any help would be appriciated!
I have an application that compiles and runs fine when run on a machine X.
We check the code out compile and run it on machine Y and it generates a null pointer exception.
The Null pointer exception is listed below the main body.
I have investigated and the code is failing when a findViewById() call is executed on an edit text box.
The call has an id (integer) but returns a null in the place of the view.
We have tried cleaning and rebuilding the project but this does not seem to resolve the problem.
I believe the problem may some how be related to R.java identifiers being corrupted on the new install.
09-08 15:50:10.186 28278-28278/ca.client.crmlogon E/ACRA: ACRA caught a RuntimeException for ca.client.crmlogon
java.lang.RuntimeException: Unable to start activity ComponentInfo{ca.client.crmlogon/ca.client.crmlogon.Activities.WorkOrderActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setVisibility(int)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2790)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2855)
at android.app.ActivityThread.access$900(ActivityThread.java:181)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1474)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6117)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setVisibility(int)' on a null object reference
at ca.client.crmlogon.Activities.GUIFormActivity.hideFieldById(GUIFormActivity.java:690)
at ca.client.crmlogon.Activities.GUIFormActivity.hideFieldByName(GUIFormActivity.java:697)
at ca.client.crmlogon.Activities.WorkOrderActivity.hideAgreementSection(WorkOrderActivity.java:1604)
at ca.client.crmlogon.Activities.WorkOrderActivity.loadServiceAppointment(WorkOrderActivity.java:2026)
at ca.client.crmlogon.Activities.WorkOrderActivity.onCreate(WorkOrderActivity.java:515)
at android.app.Activity.performCreate(Activity.java:6374)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2743)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2855)�
at android.app.ActivityThread.access$900(ActivityThread.java:181)�
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1474)�
at android.os.Handler.dispatchMessage(Handler.java:102)�
at android.os.Looper.loop(Looper.java:145)�
at android.app.ActivityThread.main(ActivityThread.java:6117)�
at java.lang.reflect.Method.invoke(Native Method)�
at java.lang.reflect.Method.invoke(Method.java:372)�
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)�
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
You may be missing some files. If you transfered it using Git, make sure all your files were added before your last commit/push.
If you transfered it over a USB stick, etc. you may have accidentally removed the device before the transfer was complete.
My first suggestion is to try the transfer again, making sure you didn't miss any files.