I set up splashscreens for my Phonegap app with the splashscreen Cordova plugin, built with "Phonegap Build".
In the splashscreen plugin docs they only mention pixel densities up to xhdpi, but recent devices go up to xxxhdpi.
So I added an xxxhdpi splashscreen image.
Now the app seems to crash on those devices on startup, and I think this is due to the large splashscreen.
java.lang.RuntimeException:
at android.view.DisplayListCanvas.throwIfCannotDraw (DisplayListCanvas.java:260)
at android.graphics.Canvas.drawBitmap (Canvas.java:1420)
at android.graphics.drawable.BitmapDrawable.draw (BitmapDrawable.java:545)
at android.widget.ImageView.onDraw (ImageView.java:1286)
at android.view.View.draw (View.java:18319)
at android.view.View.updateDisplayListIfDirty (View.java:17297)
at android.view.View.draw (View.java:18081)
at android.view.ViewGroup.drawChild (ViewGroup.java:3966)
at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3752)
at android.view.View.updateDisplayListIfDirty (View.java:17292)
at android.view.View.draw (View.java:18081)
at android.view.ViewGroup.drawChild (ViewGroup.java:3966)
at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3752)
at android.view.View.updateDisplayListIfDirty (View.java:17292)
at android.view.View.draw (View.java:18081)
at android.view.ViewGroup.drawChild (ViewGroup.java:3966)
at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3752)
at android.view.View.draw (View.java:18322)
at com.android.internal.policy.DecorView.draw (DecorView.java:854)
at android.view.View.updateDisplayListIfDirty (View.java:17297)
at android.view.ThreadedRenderer.updateViewTreeDisplayList (ThreadedRenderer.java:666)
at android.view.ThreadedRenderer.updateRootDisplayList (ThreadedRenderer.java:672)
at android.view.ThreadedRenderer.draw (ThreadedRenderer.java:780)
at android.view.ViewRootImpl.draw (ViewRootImpl.java:3112)
at android.view.ViewRootImpl.performDraw (ViewRootImpl.java:2908)
at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2502)
at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1509)
at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:7051)
at android.view.Choreographer$CallbackRecord.run (Choreographer.java:927)
at android.view.Choreographer.doCallbacks (Choreographer.java:702)
at android.view.Choreographer.doFrame (Choreographer.java:638)
at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:913)
at android.os.Handler.handleCallback (Handler.java:751)
at android.os.Handler.dispatchMessage (Handler.java:95)
at android.os.Looper.loop (Looper.java:154)
at android.app.ActivityThread.main (ActivityThread.java:6692)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1358)
In other questions I found the following suggestion:
Move your image in the (hi-res) drawable to drawable-xxhdpi
But using Phonegap Build, I don't see how I could do that. Is it not possible to have such large files? Should I remove the highest pixel densities? Is there an alternative?
Related
Recently we are preparing for Android 12 and we updated our compileSdkVersion and targetSdkVersion to 31
After updating to 31, TWA is unable to be launched. Error given is
java.lang.IllegalArgumentException: xxx.twa: 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.getActivityAsUser(PendingIntent.java:458)
at android.app.PendingIntent.getActivity(PendingIntent.java:444)
at android.app.PendingIntent.getActivity(PendingIntent.java:408)
at androidx.browser.customtabs.CustomTabsClient.createSessionId(CustomTabsClient.java:231)
at androidx.browser.customtabs.CustomTabsClient.newSession(CustomTabsClient.java:269)
at com.google.androidbrowserhelper.trusted.TwaLauncher$TwaCustomTabsServiceConnection.onCustomTabsServiceConnected(TwaLauncher.java:324)
at androidx.browser.customtabs.CustomTabsServiceConnection.onServiceConnected(CustomTabsServiceConnection.java:57)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:2077)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:2110)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7842)
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)
After updating androidx.browser:browser implementation 'androidx.browser:browser:1.4.0-beta01' i got the below error
java.lang.IllegalArgumentException: xxx.twa: 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.getActivityAsUser(PendingIntent.java:458)
at android.app.PendingIntent.getActivity(PendingIntent.java:444)
at android.app.PendingIntent.getActivity(PendingIntent.java:408)
at com.google.androidbrowserhelper.trusted.FocusActivity.addToIntent(FocusActivity.java:43)
at com.google.androidbrowserhelper.trusted.TwaLauncher.launchWhenSplashScreenReady(TwaLauncher.java:272)
at com.google.androidbrowserhelper.trusted.TwaLauncher.lambda$launchWhenSessionEstablished$4$TwaLauncher(TwaLauncher.java:257)
at com.google.androidbrowserhelper.trusted.-$$Lambda$TwaLauncher$6zo6viK_vVSs4bt2THXs48ruews.run(Unknown Source:6)
at com.google.androidbrowserhelper.trusted.splashscreens.PwaWrapperSplashScreenStrategy.lambda$onSplashImageTransferred$1$PwaWrapperSplashScreenStrategy(PwaWrapperSplashScreenStrategy.java:208)
at com.google.androidbrowserhelper.trusted.splashscreens.-$$Lambda$PwaWrapperSplashScreenStrategy$p-f_rUE4TsZEGw17K3MBDrUxlsQ.run(Unknown Source:4)
at com.google.androidbrowserhelper.trusted.splashscreens.PwaWrapperSplashScreenStrategy.runWhenEnterAnimationComplete(PwaWrapperSplashScreenStrategy.java:215)
at com.google.androidbrowserhelper.trusted.splashscreens.PwaWrapperSplashScreenStrategy.onSplashImageTransferred(PwaWrapperSplashScreenStrategy.java:207)
at com.google.androidbrowserhelper.trusted.splashscreens.PwaWrapperSplashScreenStrategy.lambda$configureTwaBuilder$0$PwaWrapperSplashScreenStrategy(PwaWrapperSplashScreenStrategy.java:195)
at com.google.androidbrowserhelper.trusted.splashscreens.-$$Lambda$PwaWrapperSplashScreenStrategy$AEuRt7oVnGOP2vf-Uvl2RaqkFW4.onFinished(Unknown Source:6)
at com.google.androidbrowserhelper.trusted.splashscreens.SplashImageTransferTask$1.onPostExecute(SplashImageTransferTask.java:144)
at com.google.androidbrowserhelper.trusted.splashscreens.SplashImageTransferTask$1.onPostExecute(SplashImageTransferTask.java:91)
at android.os.AsyncTask.finish(AsyncTask.java:771)
at android.os.AsyncTask.access$900(AsyncTask.java:199)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788)
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:7842)
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)
I tried to find an updated version of com.google.androidbrowserhelper but is unable to find any. I am currently using implementation 'com.google.androidbrowserhelper:androidbrowserhelper:2.2.2'
Have anyone encounter this and is able to help?
This is a known issue and needs changes on the underlying androidx.browser library. The changes are in 1.4.0-rc1, which should go stable in the next weeks. Another change was required in android-browser-helper and once the change to androidx.browser is out, we'll release an update that will work well with targetSdk 31.
You could use the release-candidate version of android.browser and build your own android-browser-helper, but I'd recommend waiting for the production versions to upgrade to target SDK 31.
I am getting this issue in google play console Crashes and ANRs I have tested the app on different devices it works perfectly I don't know what is the issue.
Application developed in React Native. How can I resolve this issue?
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3827)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:4003)
at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2317)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:246)
at android.app.ActivityThread.main (ActivityThread.java:8595)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1130)
Caused by: androidx.fragment.app.Fragment$InstantiationException:
at androidx.fragment.app.Fragment.instantiate (Fragment.java:566)
at androidx.fragment.app.FragmentContainer.instantiate (FragmentContainer.java:57)
at androidx.fragment.app.FragmentManager$3.instantiate (FragmentManager.java:390)
at androidx.fragment.app.FragmentStateManager.<init> (FragmentStateManager.java:74)
at androidx.fragment.app.FragmentManager.restoreSaveState (FragmentManager.java:2454)
at androidx.fragment.app.FragmentController.restoreSaveState (FragmentController.java:196)
at androidx.fragment.app.FragmentActivity.onCreate (FragmentActivity.java:287)
at androidx.appcompat.app.AppCompatActivity.onCreate (AppCompatActivity.java:106)
at com.facebook.react.ReactActivity.onCreate (ReactActivity.java:44)
at com.libonomywallet.MainActivity.onCreate (MainActivity.java:21)
at android.app.Activity.performCreate (Activity.java:8207)
at android.app.Activity.performCreate (Activity.java:8191)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1309)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3800)
Caused by: java.lang.reflect.InvocationTargetException:
at java.lang.reflect.Constructor.newInstance0 (Native Method)
at java.lang.reflect.Constructor.newInstance (Constructor.java:343)
at androidx.fragment.app.Fragment.instantiate (Fragment.java:548)
Caused by: java.lang.IllegalStateException:
at com.swmansion.rnscreens.ScreenFragment.<init> (ScreenFragment.kt:41)
at com.swmansion.rnscreens.ScreenStackFragment.<init> (ScreenStackFragment.kt:30)```
I am facing constant issues with my build.gradle.kts where the whole thing is basically red since I migrated to kotlin 1.4.20. Also, the gradle version is 6.7.1.
Any one face similar issues or is it just me? any workarounds?
when run through the cli, the build works perfectly fine but in IntelliJ, the whole thing is red
Exception in IntelliJ
java.lang.IllegalArgumentException: declarationDescriptor is null for constructor = TypeVariable(K) with class org.jetbrains.kotlin.resolve.calls.inference.model.TypeVariableTypeConstructor
at org.jetbrains.kotlin.js.descriptorUtils.DescriptorUtilsKt.getJetTypeFqName(descriptorUtils.kt:23)
at org.jetbrains.kotlin.js.descriptorUtils.DescriptorUtilsKt$getJetTypeFqName$typeArgumentsAsString$joinedTypeArguments$1.fun(descriptorUtils.kt:32)
at org.jetbrains.kotlin.js.descriptorUtils.DescriptorUtilsKt$getJetTypeFqName$typeArgumentsAsString$joinedTypeArguments$1.fun(descriptorUtils.kt)
at com.intellij.openapi.util.text.StringUtil.join(StringUtil.java:1337)
at com.intellij.openapi.util.text.StringUtil.join(StringUtil.java:1327)
at com.intellij.openapi.util.text.StringUtil.join(StringUtil.java:1307)
at org.jetbrains.kotlin.js.descriptorUtils.DescriptorUtilsKt.getJetTypeFqName(descriptorUtils.kt:32)
at org.jetbrains.hdfsplugin.highlight.kotlin.KotlinSignatureCondition.getReturnTypeFqn(KotlinSignatureCondition.kt:18)
at org.jetbrains.hdfsplugin.highlight.kotlin.KotlinSignatureCondition.getReturnTypeFqn(KotlinSignatureCondition.kt:8)
at org.jetbrains.hdfsplugin.highlight.SignatureCondition.checkCondition(SignatureCondition.kt:7)
at org.jetbrains.hdfsplugin.highlight.inspection.invalidFormat.InvalidFormatInspection.visitCall(InvalidFormatInspection.kt:13)
at org.jetbrains.hdfsplugin.highlight.inspection.invalidFormat.KotlinHdfsInvalidFormatInspection$buildVisitor$1.visitCallExpression(KotlinHdfsInvalidFormatInspection.kt:15)
at org.jetbrains.kotlin.psi.KtVisitorVoid.visitCallExpression(KtVisitorVoid.java:803)
at org.jetbrains.kotlin.psi.KtVisitorVoid.visitCallExpression(KtVisitorVoid.java:21)
at org.jetbrains.kotlin.psi.KtCallExpression.accept(KtCallExpression.java:35)
at org.jetbrains.kotlin.psi.KtElementImpl.accept(KtElementImpl.java:51)
at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:65)
at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:56)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.runToolOnElements(LocalInspectionsPass.java:296)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$3(LocalInspectionsPass.java:265)
at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:155)
at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:147)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$4(LocalInspectionsPass.java:264)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:126)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:115)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$5(LocalInspectionsPass.java:264)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1110)
at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:105)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:629)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:581)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:117)
at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:96)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:170)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:182)
at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96)
at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:
Try to delete IDEA cache folder:
~/Library/Caches/JetBrains/<product><version> on macOS
~/.cache/JetBrains/<product><version> on Linux
%LOCALAPPDATA%\JetBrains\<product><version> on Windows
If it doesn't help, please file an issue in Youtrack.
So I build a model of a tank in blender which I implemented later on in jmonkey with a spatial. But when I gave the model texture, materials and morde detail, jmonkey responds with an error "NullPointerExeption" and closes the test application which ended as a blackscreen before.
Is anyone familiar with this problem?
Stacktrace:
java.lang.NullPointerException
at com.jme3.export.binary.BinaryImporter.readObject(BinaryImporter.java:314)
at com.jme3.export.binary.BinaryImporter.load(BinaryImporter.java:242)
at com.jme3.export.binary.BinaryImporter.load(BinaryImporter.java:125)
at com.jme3.export.binary.BinaryImporter.load(BinaryImporter.java:109)
at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:259)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:373)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:416)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:420)
at mygame.Main.makeScene(Main.java:122)
at mygame.Main.simpleInitApp(Main.java:56)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:220)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
at java.lang.Thread.run(Thread.java:745)
I tried to upgrade react native on android from 0.12 to 0.15,but I got a nullpointerException when I start my app.
Is there any break up changes?Do I need to change my code?
java.lang.NullPointerException: java.lang.NullPointerException
at android.widget.TextView.checkForRelayout(TextView.java:7074)
at android.widget.TextView.setText(TextView.java:3976)
at android.widget.TextView.setText(TextView.java:3813)
at android.widget.TextView.setText(TextView.java:3788)
at com.facebook.react.views.text.ReactTextViewManager.updateExtraData(ReactTextViewManager.java:85)
at com.facebook.react.views.text.ReactTextViewManager.updateExtraData(ReactTextViewManager.java:37)
at com.facebook.react.uimanager.NativeViewHierarchyManager.updateViewExtraData(NativeViewHierarchyManager.java:110)
at com.facebook.react.uimanager.UIViewOperationQueue$UpdateViewExtraData.execute(UIViewOperationQueue.java:183)
at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:574)
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:622)
at com.facebook.react.uimanager.GuardedChoreographerFrameCallback.doFrame(GuardedChoreographerFrameCallback.java:32)
at com.facebook.react.uimanager.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:120)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:786)
at android.view.Choreographer.doCallbacks(Choreographer.java:591)
at android.view.Choreographer.doFrame(Choreographer.java:559)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:774)
at android.os.Handler.handleCallback(Handler.java:808)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5348)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645)
Any Idea to solve this problems?
In your project,open android/gradle/wrapper/gradle-wrapper.properties file,change last line distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip.
When I change the gradle version to gradle-2.2.1-all.zip, everything works fine.
If gradle-2.4-all.zip does not work,you can try replace other version,click here for more.