NoSuchMethodError : No virtual method noBackupDirectory : andriodx.work on Android.mk (AOSP App - Android 10) - android-source

Getting the following runtime crash when using androidx.work aar on Android.mk. I want to use Android Workmanager in Android 10 AOSP platform app.
11-13 12:47:10.805 6236 6236 E AndroidRuntime: java.lang.NoSuchMethodError: No virtual method noBackupDirectory(Z)Landroidx/sqlite/db/SupportSQLiteOpenHelper$Configuration$Builder; in class Landroidx/sqlite/db/SupportSQLiteOpenHelper$Configuration$Builder; or its super classes (declaration of 'androidx.sqlite.db.SupportSQLiteOpenHelper$Configuration$Builder' appears in /system/priv-app/RemoteVoiceInput/RemoteVoiceInput.apk)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at androidx.work.impl.WorkDatabase$1.create(WorkDatabase.java:127)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at androidx.work.impl.WorkDatabase_Impl.createOpenHelper(WorkDatabase_Impl.java:254)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at androidx.room.RoomDatabase.init(RoomDatabase.java:159)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at androidx.room.RoomDatabase$Builder.build(RoomDatabase.java:852)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at androidx.work.impl.WorkDatabase.create(WorkDatabase.java:154)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at androidx.work.impl.WorkManagerImpl.<init>(WorkManagerImpl.java:236)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at androidx.work.impl.WorkManagerImpl.<init>(WorkManagerImpl.java:211)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at androidx.work.impl.WorkManagerImpl.initialize(WorkManagerImpl.java:190)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at androidx.work.WorkManager.initialize(WorkManager.java:210)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at androidx.work.impl.WorkManagerInitializer.onCreate(WorkManagerInitializer.java:40)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:2092)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:2066)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:6983)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:6528)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6445)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at android.app.ActivityThread.access$1300(ActivityThread.java:219)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:107)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7356)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
11-13 12:47:10.805 6236 6236 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
11-13 12:47:10.806 4200 4200 I AvrcpMediaPlayerList: setActivePlayer(): setting player to com.google.android.music
11-13 12:47:10.820 3880 3908 W RescueParty: Noticed 4 events for UID 1000 in last 2 sec
11-13 12:47:10.822 4200 4200 D AvrcpGPMWrapper: Metadata currently out of sync for Google Play Music
Sample Andriod.mk to include androidx.work
LOCAL_STATIC_JAVA_LIBRARIES := \
androidx.room_room-runtime \
androidx.lifecycle_lifecycle-livedata \
androidx.lifecycle_lifecycle-service \
androidx.paging_paging-runtime
LOCAL_STATIC_JAVA_AAR_LIBRARIES := \
work-runtime-2.4.0
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
work-runtime-2.4.0:libs/work-runtime-2.4.0.aar

You need the latest version of androidx.sqlite as well. That's why you are seeing the exception.

Related

FFMPEG Kit issue in Banuba Video SDK : "FFmpegKit failed to start on brand"

I am trying to integrate Banuba Video Editor sdk in flutter.
The issue i am facing is as below
Banuba sdk works with native code for Android in Flutter
So Banuba requires FFMPEG dependency to define in Native Android
And I am already using 'ffmpeg_kit_flutter' plugin for flutter.
So both the FFMPEG kits are conflicted and some of the functions are not found. due to that I am receiving the below error.
When the app is launched I am receiving this Crash as mentioned
**java.lang.Error: FFmpegKit failed to start on brand: google, model: sdk_gphone_x86, device: generic_x86_arm, api level: 30, abis: x86 armeabi-v7a armeabi, 32bit abis: x86 armeabi-v7a armeabi, 64bit abis: .
** at com.arthenica.ffmpegkit.NativeLoader.loadLibrary(NativeLoader.java:50)
at com.arthenica.ffmpegkit.NativeLoader.loadFFmpegKit(NativeLoader.java:189)
at com.arthenica.ffmpegkit.FFmpegKitConfig.<clinit>(FFmpegKitConfig.java:145)
at com.arthenica.ffmpegkit.FFmpegKitConfig.enableFFmpegSessionCompleteCallback(FFmpegKitConfig.java:864)
at com.arthenica.ffmpegkit.flutter.FFmpegKitFlutterPlugin.registerGlobalCallbacks(FFmpegKitFlutterPlugin.java:168)
at com.arthenica.ffmpegkit.flutter.FFmpegKitFlutterPlugin.init(FFmpegKitFlutterPlugin.java:652)
at com.arthenica.ffmpegkit.flutter.FFmpegKitFlutterPlugin.onAttachedToActivity(FFmpegKitFlutterPlugin.java:198)
at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.attachToActivityInternal(FlutterEngineConnectionRegistry.java:351)
at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.attachToActivity(FlutterEngineConnectionRegistry.java:324)
at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:194)
at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:498)
at com.sound.it.MainActivity.onCreate(MainActivity.kt:43)
at android.app.Activity.performCreate(Activity.java:8000)
at android.app.Activity.performCreate(Activity.java:7984)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
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:2066)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
**Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "av_log_default_callback" referenced by "/data/app/~~umF3qlB9U53L4peU9nKYuQ==/com.sound.it-agqiFlNmMe17AHMK5gYIHw==/lib/x86/libffmpegkit.so"...**
at java.lang.Runtime.loadLibrary0(Runtime.java:1087)
at java.lang.Runtime.loadLibrary0(Runtime.java:1008)
at java.lang.System.loadLibrary(System.java:1664)
at com.arthenica.ffmpegkit.NativeLoader.loadLibrary(NativeLoader.java:48)
Looking for the solutions

Flutter AdMob will not launch

Trying to incorporate adMob into a flutter app and I am having this issue:
Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
lib/main.dart:1
✓ Built build/app/outputs/flutter-apk/app-debug.apk.
E/AndroidRuntime(31743): FATAL EXCEPTION: pool-3-thread-1
E/AndroidRuntime(31743): Process: com.tendigitgrid.app_free, PID: 31743
E/AndroidRuntime(31743): java.lang.IllegalArgumentException: com.tendigitgrid.app_free: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
E/AndroidRuntime(31743): 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.
E/AndroidRuntime(31743): at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
E/AndroidRuntime(31743): at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
E/AndroidRuntime(31743): at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
E/AndroidRuntime(31743): at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent(ForceStopRunnable.java:174)
E/AndroidRuntime(31743): at androidx.work.impl.utils.ForceStopRunnable.isForceStopped(ForceStopRunnable.java:108)
E/AndroidRuntime(31743): at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:86)
E/AndroidRuntime(31743): at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:75)
E/AndroidRuntime(31743): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/AndroidRuntime(31743): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/AndroidRuntime(31743): at java.lang.Thread.run(Thread.java:920)
ANd it will not launch into the emulator to test.
I have minSDK set to 21 in my gradle file.
Update:
I tried installing the apk on my real phone and not in an emulator and it also did not work.

App Crash On Google Play Games Services Login

I am attempting to test google play game services within my game but whenever I try to sign into the service my game "stops working", as in crashes. I am trying to troubleshoot this problem with the logcats sent to android device monitor, but it doesn't tell me what is going wrong with the google play game services. For instance, these are the logs once I tap the achievements button in my app (since I am not signed in yet it attempts to sign in before displaying achievements):
10-27 15:25:22.405: I/Unity(15089): UnityIAP Promo: Clearing promo product metadata
10-27 15:25:22.405: I/Unity(15089):
10-27 15:25:22.405: I/Unity(15089): (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
10-27 15:25:22.683: D/ViewRootImpl#ddd8e3d[UnityPlayerActivity](15089): ViewPostIme pointer 0
10-27 15:25:22.746: D/ViewRootImpl#ddd8e3d[UnityPlayerActivity](15089): ViewPostIme pointer 1
10-27 15:25:23.376: D/ViewRootImpl#ddd8e3d[UnityPlayerActivity](15089): ViewPostIme pointer 0
10-27 15:25:23.429: D/ViewRootImpl#ddd8e3d[UnityPlayerActivity](15089): ViewPostIme pointer 1
10-27 15:25:23.450: I/Unity(15089): Cannot show leaderboard: not authenticated
10-27 15:25:23.450: I/Unity(15089):
10-27 15:25:23.450: I/Unity(15089): (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
10-27 15:25:23.500: D/GamesUnitySDK(15089): Performing Android initialization of the GPG SDK
10-27 15:25:23.537: I/Unity(15089): Building GPG services, implicitly attempts silent auth
10-27 15:25:23.537: I/Unity(15089):
10-27 15:25:23.537: I/Unity(15089): (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
10-27 15:25:23.602: W/Unity(15089): !!! [Play Games Plugin DLL] 10/27/18 15:25:23 -04:00 WARNING: Creating new PlayGamesPlatform
10-27 15:25:23.602: W/Unity(15089):
10-27 15:25:23.602: W/Unity(15089): (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
10-27 15:25:23.602: I/Unity(15089): [Play Games Plugin DLL] 10/27/18 15:25:23 -04:00 DEBUG: Activating PlayGamesPlatform.
10-27 15:25:23.602: I/Unity(15089):
10-27 15:25:23.602: I/Unity(15089): (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
10-27 15:25:23.602: I/Unity(15089): [Play Games Plugin DLL] 10/27/18 15:25:23 -04:00 DEBUG: PlayGamesPlatform activated: GooglePlayGames.PlayGamesPlatform
10-27 15:25:23.602: I/Unity(15089):
10-27 15:25:23.602: I/Unity(15089): (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
10-27 15:25:23.602: I/Unity(15089): [Play Games Plugin DLL] 10/27/18 15:25:23 -04:00 DEBUG: Creating platform-specific Play Games client.
10-27 15:25:23.602: I/Unity(15089):
10-27 15:25:23.602: I/Unity(15089): (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
10-27 15:25:23.602: I/Unity(15089): [Play Games Plugin DLL] 10/27/18 15:25:23 -04:00 DEBUG: Creating Android IPlayGamesClient Client
10-27 15:25:23.602: I/Unity(15089):
10-27 15:25:23.602: I/Unity(15089): (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
To my surprise they even just updated the google play game services unity plugin 2 days ago so that it now works with newer gms libraries, but it still won't work for me. This leads me to believe it is probably a different issue. Any advice would be very appreciated.
Thanks,
If anyone is having this issue please follow the steps:
https://github.com/playgameservices/play-games-plugin-for-unity/issues/2217#issuecomment-417619382
Worked perfectly for me and you don't need to downgrade any libraries!

java.lang.NoSuchMethodError: com.vungle.warren.Vungle.updateConsentStatus after updating to latest Vungle SDK

I am using Vungle ad network via MoPub SDK for showing ads in Android Application. I have just updated the Vungle SDK to latest as per their changelog (version 6.3.12). Now the app is crashing. The exception is as below:
08-03 16:56:58.480 14071-14071/com.globaldelight.vizmato E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.globaldelight.vizmato, PID: 14071
java.lang.NoSuchMethodError: com.vungle.warren.Vungle.updateConsentStatus
at com.mopub.mobileads.VungleRouter$2.onSuccess(VungleRouter.java:85)
at com.vungle.warren.Vungle$2.onResponse(Vungle.java:479)
at com.vungle.warren.network.VungleApiClient$4.onResponse(VungleApiClient.java:514)
at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:68)
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:5333)
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)
at dalvik.system.NativeStart.main(Native Method)
Could someone please help me solve this issue?
Thanks in advance.

Kudan for Unity v1.1.3 : Crash on Android/Unable to start application

I have installed Kudan 1.1.3 in Unity 5.3.4. I have followed 100% accurately the scene setup from Kudan's "getting started" guide. I hit "build and run", everything looks OK but once starting on Nexus 9, the app dies immediately. I generated a bug report with ADB and here is the crash narrowed to whatever seemed to me relevant :
05-24 13:38:28.619 5751 5777 E Unity : [KudanAR] Graphics vendor: NVIDIA Corporation
05-24 13:38:28.619 5751 5777 E Unity :
05-24 13:38:28.619 5751 5777 E Unity : (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)
05-24 13:38:28.619 5751 5777 E Unity :
05-24 13:38:28.620 5751 5777 E Unity : [KudanAR] Graphics version: OpenGL ES 3.1 NVIDIA 343.00
05-24 13:38:28.620 5751 5777 E Unity :
05-24 13:38:28.620 5751 5777 E Unity : (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)
05-24 13:38:28.620 5751 5777 E Unity :
05-24 13:38:28.667 617 794 D ConnectivityService: notifyType CAP_CHANGED for NetworkAgentInfo [WIFI () - 100]
05-24 13:38:28.719 5751 5777 D Kudan : KudanAR initialise called
05-24 13:38:28.721 5751 5777 D Kudan : CameraPreviewAndRender initialise called
05-24 13:38:28.722 5751 5777 D Kudan : OpenGL ES version is set to: 3
05-24 13:38:28.722 5751 5777 D Kudan : OpenGL ES Can use glBindArray: true
05-24 13:38:28.722 5751 5777 D Kudan : CameraPreviewAndRender loadShaders called
05-24 13:38:28.722 5751 5777 D Kudan : CameraPreviewAndRender CreateTexture called
05-24 13:38:28.723 5751 5777 D Kudan : CameraPreviewAndRender BindSinkTexture called
05-24 13:38:28.723 5751 5777 D Kudan : CameraPreviewAndRender CreateShaderProgram called
05-24 13:38:28.752 5751 5777 D Kudan : CameraPreviewAndRender SetupShaderProgram called
05-24 13:38:28.752 5751 5777 D Kudan : CameraPreviewAndRender CreateQuadGeometry called
05-24 13:38:28.752 5751 5777 D Kudan : StopTrackerThread called - bWaitForFinish: true
05-24 13:38:28.752 5751 5777 D Kudan : StartTrackerThread: creating thread TrackerThread1464111508
05-24 13:38:28.754 5751 5777 D Kudan : StartTrackerThread: Finished
05-24 13:38:28.767 5751 5777 I kudan-ndk: checking
05-24 13:38:28.782 5751 5751 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 5751 (eu.kudan.ar)
05-24 13:38:28.831 617 981 I WindowState: WIN DEATH: Window{a426155 u0 SurfaceView}
05-24 13:38:28.832 617 654 I chatty : uid=1000(system) InputDispatcher expire 2 lines
05-24 13:38:28.834 617 979 I WindowState: WIN DEATH: Window{4004c13 u0 eu.kudan.ar/com.unity3d.player.UnityPlayerActivity}
05-24 13:38:28.834 617 979 I chatty : uid=1000(system) Binder_7 expire 1 line
05-24 13:38:28.847 617 984 I ActivityManager: Process eu.kudan.ar (pid 5751) has died
Everything looks OK until the "kudan-ndk: checking" line. I am not a pro using Android but I did considered the "Gotchas" at the bottom of this turotial page : https://wiki.kudan.eu/Unity
I have installed Android API 22 using Android SDK manager since that level is stated as the targeted one. I have also forced screen orientation to be "landscape left" in player settings in Unity and I have even installed Android API 23 since my Nexus 9 has Android version 6.0.1. Maybe that last part is causing the problem... or not? Can anyone share a better understanding of this problem?
We have put new tutorials on the Kudan Wiki that should be much easier to follow. The ones helpful to you are called:
My First Augmented Reality App (1.1.3 Stable)
Building the App - Android
In response to your actual question, crash on start is generally caused by an incorrect API Key, which is set on the Kudan Camera. Ensure that this matches with its according Bundle ID, which is set in the player settings in Unity.
F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 5751 (eu.kudan.ar)
I also had that error and it was because of a kudan marker, I replaced it with another one and it started working again.