Weex Library Crash on Android - weex

I am getting this random crash in weex on android platform.
Weex version details-
v1.3.8
- weexpack : v1.2.3
- weex-builder : v0.4.0
- weex-previewer : v1.5.1
Facing a crash in sdk : java.lang.NullPointerException: Attempt to invoke virtual method 'com.taobao.weex.ui.flat.WidgetContainer com.taobao.weex.ui.flat.FlatGUIContext.getFlatComponentAncestor(com.taobao.weex.ui.component.WXComponent)' on a null object reference
at com.taobao.weex.ui.component.WXComponent.setComponentLayoutParams(WXComponent.java:559)
at com.taobao.weex.ui.component.WXComponent.setLayout(WXComponent.java:551)
at com.taobao.weex.ui.RenderActionContextImpl.setLayout(RenderActionContextImpl.java:82)
at com.taobao.weex.ui.WXRenderManager.setLayout(WXRenderManager.java:150)
at com.taobao.weex.dom.DOMActionContextImpl$ApplyUpdateConsumer$1.execute(DOMActionContextImpl.java:276)
at com.taobao.weex.ui.WXRenderManager$1.run(WXRenderManager.java:104)
at com.taobao.weex.common.WXThread$SafeRunnable.run(WXThread.java:48)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6592)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:769)

Already fixed, not released yet. You can build from source if emergency.

Related

Unable to start receiver com.google.android.finsky.instantapps.PhenotypeUpdateReceiver: java.lang.IllegalStateException

I have released my game to play console which is made using Unity. The Pre-launch report, reported the following crash issues during internal testing.
java.lang.RuntimeException: Unable to start receiver com.google.android.finsky.instantapps.PhenotypeUpdateReceiver: java.lang.IllegalStateException: Not allowed to start service Intent { act=com.google.android.gms.phenotype.UPDATE cmp=com.android.vending/com.google.android.finsky.instantapps.PhenotypeUpdateService }: app is in background uid UidRecord{46dceb4 u0a249 TRNB bg:+10m41s432ms idle change:uncached procs:4 proclist:29801,29978,30388,30591, seq(0,0,0)}
AND
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
I am not sure, where exactly the error is and why?
Full trace for the first issue:
FATAL EXCEPTION: main
Process: com.android.vending:instant_app_installer, PID: 19323
java.lang.RuntimeException: Unable to start receiver com.google.android.finsky.instantapps.PhenotypeUpdateReceiver: android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { act=com.google.android.gms.phenotype.UPDATE cmp=com.android.vending/com.google.android.finsky.instantapps.PhenotypeUpdateService }: app is in background uid UidRecord{64ad173 u0a135 TRNB bg:+13m22s373ms idle change:uncached procs:0 seq(0,0,0)}
at android.app.ActivityThread.handleReceiver(ActivityThread.java:4317)
at android.app.ActivityThread.access$1600(ActivityThread.java:247)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2064)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7839)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { act=com.google.android.gms.phenotype.UPDATE cmp=com.android.vending/com.google.android.finsky.instantapps.PhenotypeUpdateService }: app is in background uid UidRecord{64ad173 u0a135 TRNB bg:+13m22s373ms idle change:uncached procs:0 seq(0,0,0)}
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1861)
at android.app.ContextImpl.startService(ContextImpl.java:1817)
at android.content.ContextWrapper.startService(ContextWrapper.java:774)
at alj.a(PG:2)
at alm.a(PG:3)
at wnv.a(PG:2)
at com.google.android.finsky.instantapps.PhenotypeUpdateReceiver.onReceive(PG:6)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:4308)
... 9 more
Full trace for the second issue:
FATAL EXCEPTION: pool-3-thread-1
Process: com.HefazSofts.AayaanTheRunner, PID: 19257
java.lang.IllegalArgumentException: com.HefazSofts.AayaanTheRunner: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent(ForceStopRunnable.java:174)
at androidx.work.impl.utils.ForceStopRunnable.isForceStopped(ForceStopRunnable.java:108)
at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:86)
at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:75)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:920)

How to resolve "Could not create an instance of type org.gradle.initialization.DefaultSettings_Decorated." for InMobi Unity Mediation Plugin

I am trying to implement google-admob mediation and currently working on Integrating InMobi ads. I followed all the steps as per https://developers.google.com/admob/unity/mediation/inmobi .I was able to create the Account ID and Placement ID in the inMobi website . I successfully was able to configure AdMob ad unit in my admob account.
The problem is in the 3rd step of the process which is "Import the InMobi SDK and adapter". I extracted the latest version of Google Mobile Ads mediation plugin for InMobi from this link https://developers.google.com/admob/unity/mediation/inmobi#inmobi-unity-mediation-plugin-changelog .
But while performing this step Assets > Play Services Resolver > Android Resolver > Force Resolve , I am getting the following "Android Dependencies , Resolution failed" error. I am attaching the screen shot and the log file below. I tried to change the version of the InMobi Unity Mediation Plugin some 5 times,but all the time it keeps failing. I changed to stack trace to full and understand but still can't really figure out what to do.
For inMobi ad mediation for unity there is no video on youtube also. Please help me to figure out the solution for this problem.
Log files details:
Running Gradle...
C:\Users\cheth\FlutteringBirds1\Temp\PlayServicesResolverGradle\gradlew.bat --no-daemon -b "C:\Users\cheth\FlutteringBirds1\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=C:/Program Files/Unity/Hub/Editor/2021.1.6f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK" "-PTARGET_DIR=C:\Users\cheth\FlutteringBirds1\Assets\Plugins\Android" "-PMAVEN_REPOS=file:///C:/Users/cheth/FlutteringBirds1/Assets/Firebase/m2repository;https://maven.google.com/;https://jcenter.bintray.com/" "-PPACKAGES_TO_COPY=com.google.firebase:firebase-common:19.5.0;com.google.firebase:firebase-analytics:18.0.2;com.google.android.gms:play-services-base:17.6.0;com.google.firebase:firebase-app-unity:7.1.0;com.google.firebase:firebase-messaging:21.0.1;com.google.firebase:firebase-messaging-unity:7.1.0;com.google.android.gms:play-services-ads:19.5.0;com.google.ads.mediation:inmobi:9.1.1.0" "-PUSE_JETIFIER=1" "-PDATA_BINDING_VERSION=3.6.0"
Executing command: C:\Users\cheth\FlutteringBirds1\Temp\PlayServicesResolverGradle\gradlew.bat --no-daemon -b "C:\Users\cheth\FlutteringBirds1\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=C:/Program Files/Unity/Hub/Editor/2021.1.6f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK" "-PTARGET_DIR=C:\Users\cheth\FlutteringBirds1\Assets\Plugins\Android" "-PMAVEN_REPOS=file:///C:/Users/cheth/FlutteringBirds1/Assets/Firebase/m2repository;https://maven.google.com/;https://jcenter.bintray.com/" "-PPACKAGES_TO_COPY=com.google.firebase:firebase-common:19.5.0;com.google.firebase:firebase-analytics:18.0.2;com.google.android.gms:play-services-base:17.6.0;com.google.firebase:firebase-app-unity:7.1.0;com.google.firebase:firebase-messaging:21.0.1;com.google.firebase:firebase-messaging-unity:7.1.0;com.google.android.gms:play-services-ads:19.5.0;com.google.ads.mediation:inmobi:9.1.1.0" "-PUSE_JETIFIER=1" "-PDATA_BINDING_VERSION=3.6.0"
Reporting analytics data: /androidresolver/resolve/gradle/failed/fetch?unityVersion=2021.1.6f1&unityPlatform=WindowsEditor&installSource=upm&version=1.2.164&scope= 'Android Resolver: Gradle Resolve: Tool Extraction Failed'
ERROR: Gradle failed to fetch dependencies.
Failed to run 'C:\Users\cheth\FlutteringBirds1\Temp\PlayServicesResolverGradle\gradlew.bat --no-daemon -b "C:\Users\cheth\FlutteringBirds1\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=C:/Program Files/Unity/Hub/Editor/2021.1.6f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK" "-PTARGET_DIR=C:\Users\cheth\FlutteringBirds1\Assets\Plugins\Android" "-PMAVEN_REPOS=file:///C:/Users/cheth/FlutteringBirds1/Assets/Firebase/m2repository;https://maven.google.com/;https://jcenter.bintray.com/" "-PPACKAGES_TO_COPY=com.google.firebase:firebase-common:19.5.0;com.google.firebase:firebase-analytics:18.0.2;com.google.android.gms:play-services-base:17.6.0;com.google.firebase:firebase-app-unity:7.1.0;com.google.firebase:firebase-messaging:21.0.1;com.google.firebase:firebase-messaging-unity:7.1.0;com.google.android.gms:play-services-ads:19.5.0;com.google.ads.mediation:inmobi:9.1.1.0" "-PUSE_JETIFIER=1" "-PDATA_BINDING_VERSION=3.6.0"'
stdout:
stderr:
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
at org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:43)
at org.codehaus.groovy.reflection.GroovyClassValueFactory.<clinit>(GroovyClassValueFactory.java:35)
at org.codehaus.groovy.reflection.ClassInfo.<clinit>(ClassInfo.java:109)
at org.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:95)
at org.codehaus.groovy.reflection.ReflectionCache.<clinit>(ReflectionCache.java:39)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerMethods(MetaClassRegistryImpl.java:209)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:107)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:85)
at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:36)
at org.codehaus.groovy.runtime.InvokerHelper.<clinit>(InvokerHelper.java:86)
at groovy.lang.GroovyObjectSupport.getDefaultMetaClass(GroovyObjectSupport.java:59)
at groovy.lang.GroovyObjectSupport.<init>(GroovyObjectSupport.java:32)
at org.gradle.api.internal.plugins.DefaultExtraPropertiesExtension.<init>(DefaultExtraPropertiesExtension.java:29)
at org.gradle.api.internal.plugins.DefaultConvention.<init>(DefaultConvention.java:47)
at org.gradle.api.internal.ExtensibleDynamicObject.<init>(ExtensibleDynamicObject.java:58)
at org.gradle.initialization.DefaultSettings.<init>(DefaultSettings.java:93)
at org.gradle.initialization.DefaultSettings_Decorated.<init>(Unknown Source)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at org.gradle.internal.reflect.DirectInstantiator.newInstance(DirectInstantiator.java:51)
at org.gradle.api.internal.ClassGeneratorBackedInstantiator.newInstance(ClassGeneratorBackedInstantiator.java:36)
at org.gradle.initialization.SettingsFactory.createSettings(SettingsFactory.java:52)
at org.gradle.initialization.ScriptEvaluatingSettingsProcessor.process(ScriptEvaluatingSettingsProcessor.java:56)
at org.gradle.initialization.PropertiesLoadingSettingsProcessor.process(PropertiesLoadingSettingsProcessor.java:37)
at org.gradle.initialization.SettingsEvaluatedCallbackFiringSettingsProcessor.process(SettingsEvaluatedCallbackFiringSettingsProcessor.java:34)
at org.gradle.initialization.RootBuildCacheControllerSettingsProcessor.process(RootBuildCacheControllerSettingsProcessor.java:36)
at org.gradle.initialization.BuildOperationSettingsProcessor$2.call(BuildOperationSettingsProcessor.java:48)
at org.gradle.initialization.BuildOperationSettingsProcessor$2.call(BuildOperationSettingsProcessor.java:45)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:315)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:305)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:101)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
at org.gradle.initialization.BuildOperationSettingsProcessor.process(BuildOperationSettingsProcessor.java:45)
at org.gradle.initialization.DefaultSettingsLoader.findSettingsAndLoadIfAppropriate(DefaultSettingsLoader.java:104)
at org.gradle.initialization.DefaultSettingsLoader.findAndLoadSettings(DefaultSettingsLoader.java:45)
at org.gradle.initialization.SettingsAttachingSettingsLoader.findAndLoadSettings(SettingsAttachingSettingsLoader.java:35)
at org.gradle.internal.composite.CommandLineIncludedBuildSettingsLoader.findAndLoadSettings(CommandLineIncludedBuildSettingsLoader.java:34)
at org.gradle.internal.composite.ChildBuildRegisteringSettingsLoader.findAndLoadSettings(ChildBuildRegisteringSettingsLoader.java:47)
at org.gradle.internal.composite.CompositeBuildSettingsLoader.findAndLoadSettings(CompositeBuildSettingsLoader.java:35)
at org.gradle.initialization.DefaultGradleLauncher$LoadBuild.run(DefaultGradleLauncher.java:277)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.initialization.DefaultGradleLauncher.loadSettings(DefaultGradleLauncher.java:202)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:147)
at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:134)
at org.gradle.internal.invocation.GradleBuildController$1.execute(GradleBuildController.java:58)
at org.gradle.internal.invocation.GradleBuildController$1.execute(GradleBuildController.java:55)
at org.gradle.internal.invocation.GradleBuildController$3.create(GradleBuildController.java:82)
at org.gradle.internal.invocation.GradleBuildController$3.create(GradleBuildController.java:75)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:183)
at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:40)
at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:75)
at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:55)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:58)
at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:39)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:49)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:44)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:315)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:305)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:101)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:44)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:49)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:46)
at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:78)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:46)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:31)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:42)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:28)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:78)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:52)
at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:59)
at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:36)
at org.gradle.tooling.internal.provider.SessionScopeBuildActionExecuter.execute(SessionScopeBuildActionExecuter.java:68)
at org.gradle.tooling.internal.provider.SessionScopeBuildActionExecuter.execute(SessionScopeBuildActionExecuter.java:38)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:37)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:26)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:60)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:32)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:55)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:41)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:48)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:32)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:55)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:207)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:403)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:376)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:37)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:23)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:369)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:299)
at org.gradle.launcher.Main.doAction(Main.java:36)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
FAILURE: Build failed with an exception.
* What went wrong:
Could not create an instance of type org.gradle.initialization.DefaultSettings_Decorated.
> Could not initialize class org.codehaus.groovy.reflection.ReflectionCache
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
exit code: 1
It's a bug that has existed for years. Maybe we've been dealing with this since the 2017 release. But unfortunately, it is not even clear what Unity is doing about it.
To solve: Edit->Preferences->External Tools
In the window that opens, you must remove the checkboxes at the bottom and give the same paths! It's ridiculous, but yes, it's true!!!
Good luck, we need it.
In my case switching Edit->Preferences->ExternalTools->JDK from default OpenJDK to manually installed old Oracle JavaSE8 JDK helped.
I had the same error message and tried a lot of things to fix it. Finally updating Java from jdk-17 to jdk-19 fixed it. I also updated the environment variables
JAVA_HOME=C:\Program Files\Java\jdk-19
and
PATH=C:\Program Files\Java\jdk-19\bin
Note that the PATH variable actually contains many more paths from other programs on my system. A windows logoff and login is required for the changes to take effect.

Flutter Firebase Authentication app crashes after creating user

I've been using firebase services for quite some time.
So i started a new flutter project yesterday and i'm experiencing app crashes, some times when when a user registers an account With Firebase Auth. according to console log, its probably because of invoking onAuthStateChanged.
Can anyone help me resolve this.
NB: Sometimes an account is created successfully without the app crashing.
This is the code where i call onAuthStateChanged :
User _userFromFirebase(FirebaseUser user){
return user != null ? User(uid: user.uid, email: user.email, name: user.displayName, phoneNo: user.phoneNumber)
: null ;
}
Stream<User> get user {
return _auth.onAuthStateChanged.map(_userFromFirebase);
}
Below is the debug console output;
D/FirebaseAuth(14930): Notifying id token listeners about user ( VZcLcnr4dJOZgLjFYU3ls96yHK13 ).
D/FirebaseAuth(14930): Notifying auth state listeners about user ( VZcLcnr4dJOZgLjFYU3ls96yHK13 ).
D/AndroidRuntime(14930): Shutting down VM
E/AndroidRuntime(14930): FATAL EXCEPTION: main
E/AndroidRuntime(14930): Process: com.tonnyapps.app3, PID: 14930
E/AndroidRuntime(14930): java.lang.NullPointerException: Attempt to invoke virtual method 'void io.flutter.plugin.common.MethodChannel.invokeMethod(java.lang.String, java.lang.Object)' on a null object reference
E/AndroidRuntime(14930): at io.flutter.plugins.firebaseauth.FirebaseAuthPlugin$3.onAuthStateChanged(FirebaseAuthPlugin.java:710)
E/AndroidRuntime(14930): at com.google.firebase.auth.zzp.run(com.google.firebase:firebase-auth##19.2.0:3)
E/AndroidRuntime(14930): at android.os.Handler.handleCallback(Handler.java:873)
E/AndroidRuntime(14930): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(14930): at com.google.android.gms.internal.firebase_auth.zzj.dispatchMessage(com.google.firebase:firebase-auth##19.2.0:6)
E/AndroidRuntime(14930): at android.os.Looper.loop(Looper.java:214)
E/AndroidRuntime(14930): at android.app.ActivityThread.main(ActivityThread.java:7050)
E/AndroidRuntime(14930): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(14930): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
E/AndroidRuntime(14930): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
I/Process (14930): Sending signal. PID: 14930 SIG: 9
Lost connection to device.
After many efforts tweaking around with the code and updating dependencies to support higher versions of firebase_auth. I was able to upgrade and fix the version of firebase_auth to version 0.20.1, since it was the last non null-safe version.
And Wallah, it worked, this must have been a bug with whatever version i was using. But it was solved with later releases. The users can now create users successfully and proceed with the normal app flow.
So setting firebase_auth: 0.20.1 in the pubspec.yaml, worked for me.
Since, the project is old, I would recommend the best option is updating all the code, and preferably migrating the project to null safety. This should give you more control over the project future development, and also probably fix the bugs you are experiencing with the old code.

mapbox navigation android - fragment - failed to call observer method

I created a small project to show the error I have on the MapBox Navigation library.
I would like to know if it comes from an element in the life cycle or the SDK used directly?
The difficulty lies in the fact that I would like the fragment to restart the navigation service at each arrival on it.
Link project:
https://github.com/gonzalt03/mapbox-navigation-android-fragment-test-app
02-05 16:17:47.353 24931-24931/com.company.myapplication E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.company.myapplication, PID: 24931
java.lang.RuntimeException: Unable to resume activity {com.company.myapplication/com.company.myapplication.MainActivity}: java.lang.RuntimeException: Failed to call observer method
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3848)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3889)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6836)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
Caused by: java.lang.RuntimeException: Failed to call observer method
at android.arch.lifecycle.ClassesInfoCache$MethodReference.invokeCallback(ClassesInfoCache.java:225)
at android.arch.lifecycle.ClassesInfoCache$CallbackInfo.invokeMethodsForEvent(ClassesInfoCache.java:193)
at android.arch.lifecycle.ClassesInfoCache$CallbackInfo.invokeCallbacks(ClassesInfoCache.java:184)
at android.arch.lifecycle.ReflectiveGenericLifecycleObserver.onStateChanged(ReflectiveGenericLifecycleObserver.java:36)
at android.arch.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:353)
at android.arch.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.java:291)
at android.arch.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.java:331)
at android.arch.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.java:137)
at android.arch.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.java:123)
at android.arch.lifecycle.ReportFragment.dispatch(ReportFragment.java:121)
at android.arch.lifecycle.ReportFragment.onStart(ReportFragment.java:81)
at android.app.Fragment.performStart(Fragment.java:2378)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1027)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1171)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1153)
at android.app.FragmentManagerImpl.dispatchStart(FragmentManager.java:2048)
at android.app.FragmentController.dispatchStart(FragmentController.java:188)
at android.app.Activity.performStart(Activity.java:6978)
at android.app.Activity.performRestart(Activity.java:7088)
at android.app.Activity.performResume(Activity.java:7093)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3825)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3889) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:154) 
at android.app.ActivityThread.main(ActivityThread.java:6836) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410) 
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference
at com.mapbox.mapboxsdk.plugins.locationlayer.LocationLayer.setLayerVisibility(LocationLayer.java:76)
at com.mapbox.mapboxsdk.plugins.locationlayer.LocationLayerPlugin.setLocationLayerEnabled(LocationLayerPlugin.java:139)
at com.mapbox.mapboxsdk.plugins.locationlayer.LocationLayerPlugin.onStart(LocationLayerPlugin.java:265)...

Eclipse: com.google.maps.android.utils.demo linking fails

I have been strugling with integration of google maps utiliy
https://developers.google.com/maps/documentation/android/utility/marker-clustering.
I use ADT (Eclipse) and is able to compile and 'almost' launch it as an Android application. But crashes during startup.
This is what I get from LogCat
02-22 09:49:05.386: I/dalvikvm(13953): Failed resolving Lcom/google/maps/android/utils/demo/CustomMarkerClusteringDemoActivity; interface 2305 'Lcom/google/maps/android/clustering/ClusterManager$OnClusterClickListener;'
02-22 09:49:05.386: W/dalvikvm(13953): Link of class 'Lcom/google/maps/android/utils/demo/CustomMarkerClusteringDemoActivity;' failed
02-22 09:49:05.386: E/dalvikvm(13953): Could not find class 'com.google.maps.android.utils.demo.CustomMarkerClusteringDemoActivity', referenced from method com.google.maps.android.utils.demo.MainActivity.onCreate
02-22 09:49:05.386: W/dalvikvm(13953): VFY: unable to resolve const-class 2324 (Lcom/google/maps/android/utils/demo/CustomMarkerClusteringDemoActivity;) in Lcom/google/maps/android/utils/demo/MainActivity;
02-22 09:49:05.386: D/dalvikvm(13953): VFY: replacing opcode 0x1c at 0x001d
02-22 09:49:05.486: D/AndroidRuntime(13953): Shutting down VM
02-22 09:49:05.486: W/dalvikvm(13953): threadid=1: thread exiting with uncaught exception (group=0x41926898)
02-22 09:49:05.486: E/AndroidRuntime(13953): FATAL EXCEPTION: main
02-22 09:49:05.486: E/AndroidRuntime(13953): java.lang.NoClassDefFoundError: com.google.maps.android.utils.demo.CustomMarkerClusteringDemoActivity
02-22 09:49:05.486: E/AndroidRuntime(13953): at com.google.maps.android.utils.demo.MainActivity.onCreate(MainActivity.java:21)
Anybody have experienced similar problem?
Regards OFK