Friday, June 17, 2022
HomeGame DevelopmentCocos2d-x sport crash in Android targetSdkVersion 31 - C++

Cocos2d-x sport crash in Android targetSdkVersion 31 – C++


hello builders, is there any thought on these crashes please assist me to resolve these two crashes. want your assist please assist me.
1)
java.lang.IllegalArgumentException:
at android.app.PendingIntent.checkFlags (PendingIntent.java:382)
at android.app.PendingIntent.getBroadcastAsUser (PendingIntent.java:673)
at android.app.PendingIntent.getBroadcast (PendingIntent.java:660)
at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent (ForceStopRunnable.java:5)
at androidx.work.impl.utils.ForceStopRunnable.isForceStopped (ForceStopRunnable.java:4)
at androidx.work.impl.utils.ForceStopRunnable.run (ForceStopRunnable.java:50)
at androidx.work.impl.utils.SerialExecutor$Job.run (SerialExecutor.java:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Employee.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:920)

exception.class.lacking.Unknown

exception.class.lacking.Unknown: Strongly think about using FLAG_IMMUTABLE, solely use FLAG_MUTABLE if some performance depends upon the PendingIntent being mutable, e.g. if it must be used with inline replies or bubbles.
at android.app.PendingIntent.checkFlags (PendingIntent.java:382)
at android.app.PendingIntent.getBroadcastAsUser (PendingIntent.java:673)
at android.app.PendingIntent.getBroadcast (PendingIntent.java:660)
at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent (ForceStopRunnable.java:5)
at androidx.work.impl.utils.ForceStopRunnable.isForceStopped (ForceStopRunnable.java:4)
at androidx.work.impl.utils.ForceStopRunnable.run (ForceStopRunnable.java:50)
at androidx.work.impl.utils.SerialExecutor$Job.run (SerialExecutor.java:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Employee.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:920)

Deadly Exception: java.lang.IllegalArgumentException: com.companyname.gamename: Concentrating on S+ (model 31 and above) requires that one among FLAG_IMMUTABLE or FLAG_MUTABLE be specified when making a PendingIntent.
Strongly think about using FLAG_IMMUTABLE, solely use FLAG_MUTABLE if some performance depends upon the PendingIntent being mutable, e.g. if it must be used with inline replies or bubbles.
at android.app.PendingIntent.checkFlags(PendingIntent.java:382)
at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:673)
at android.app.PendingIntent.getBroadcast(PendingIntent.java:660)
at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent(ForceStopRunnable.java:5)
at androidx.work.impl.utils.ForceStopRunnable.isForceStopped(ForceStopRunnable.java:4)
at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:50)
at androidx.work.impl.utils.SerialExecutor$Job.run(SerialExecutor.java:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Employee.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:920)


anybody have an thought ?? kindly please assist me to get answer. @CocosMarketing

The answer, as outlined right here, is so as to add a dependency to your construct.gradle file for Android 12 builds:

implementation 'androidx.work:work-runtime:2.7.1'

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments