libsomeip3.so not being loaded into the Android virtual device - android

I am trying to run vsomeip Java API example from https://github.com/lixiaolia/ndk-someiplib.
Build is successful but while launching the hello world service I am getting below error.
2022-11-12 21:23:15.966 3598-3598 MainActivity com.example.vsomeiphelloworld D vsomeipBaseDir: /data/user/0/com.example.vsomeiphelloworld/cache/vsomeip
2022-11-12 21:23:15.966 3598-3598 MainActivity com.example.vsomeiphelloworld D Os.getenv("VSOMEIP_BASE_PATH"): /data/user/0/com.example.vsomeiphelloworld/cache/vsomeip/
2022-11-12 21:23:16.024 3598-3598 ServiceVso...rldService com.example.vsomeiphelloworld D onCreate()
2022-11-12 21:23:16.024 3598-3598 ServiceVso...rldService com.example.vsomeiphelloworld D onStartCommand()
2022-11-12 21:23:16.051 3598-3598 AndroidRuntime com.example.vsomeiphelloworld D Shutting down VM
2022-11-12 21:23:16.052 3598-3598 AndroidRuntime com.example.vsomeiphelloworld E FATAL EXCEPTION: main
Process: com.example.vsomeiphelloworld, PID: 3598
java.lang.UnsatisfiedLinkError: dlopen failed: library "libvsomeip3.so" not found: needed by /data/app/~~flBAHgGOZ1GR2qSnIduRoQ==/com.example.vsomeiphelloworld-a_eINFrhrnN_QujTru-l2w==/base.apk!/lib/x86_64/libServiceVsomeipHelloWorldServiceJNI.so in namespace classloader-namespace
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.example.vsomeiphelloworld.ServiceVsomeipHelloWorldService.onStartCommand(ServiceVsomeipHelloWorldService.java:39)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4320)
at android.app.ActivityThread.access$1800(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1951)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7664)
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)
---------------------------- PROCESS ENDED (3598) for package com.example.vsomeiphelloworld ----------------------------
I have not yet built the Java app since the C++ library itself is being deleted as soon as the Task :app:buildCMakeDebug[x86_64] is over. The cmake file is as below. Strangely the other .so files remain till end of the build - libvsomeip3-cfg, libvsomeip3-e2e, libvsomeip3-sd. Top level Cmake file is as below.
cmake_minimum_required(VERSION 3.4.1)
project(vsomeip-hello-world)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
add_subdirectory(external/boost-cmake)
add_subdirectory(external/vsomeip)
add_subdirectory(external/vsomeip/examples/hello_world)
#add_subdirectory(app/src/main/cpp)
Note: If I uncomment the last line I get "missing libvsomeip3-cfg.so" which is a separate question.
build.gradle file is as below
plugins {
id 'com.android.application'
}
android {
namespace 'com.example.vsomeiphelloworld'
compileSdk 33
defaultConfig {
applicationId "com.example.vsomeiphelloworld"
minSdk 30
targetSdk 33
versionCode 1
versionName "1.0"
ndk {
abiFilters 'x86_64'
}
}
externalNativeBuild {
cmake {
path file('../CMakeLists.txt')
version '3.18.1'
}
}
ndkVersion '22.1.7171670'
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
}
AGP: 7.2.0
Gradle version: 7.5
NDK version: 22.1.7171670
Android Studio version: 2021.3.1 Patch 1
CMake version: 3.18.1
SDK version: 33
Someone kindly help me understand the issue. A quick fix is also welcome given my project timeline.

Related

Pixel 5: Failed loading RS driver: dlopen failed: library "libRSDriver_adreno.so

I've created an Android app using RenderScript, it works on a wide variety of systems but it seems to not run on specifically the Pixel 5.
I have tried to debug it with a real device but I cannot find the source of the issue.
I get the following errors (yuv420888.so is my RS file):
Failed loading RS driver: dlopen failed: library "libRSDriver_adreno.so
Failed to load runtime libRSDriver_adreno.so, loading default
...
Unable to open shared library (/data/user_de/0/com.example.app/code_cache/com.android.renderscript.cache/librs.yuv420888.so): (null)
And then I get a larger stack of errors about some unimplemented method:
2022-01-26 11:49:30.190 4366-4972/com.example.app E/CameraCaptureSession: Session 0: Exception while stopping repeating:
android.hardware.camera2.CameraAccessException: CAMERA_ERROR (3): cancelRequest:459: Camera 0: Error clearing streaming request: Function not implemented (-38)
at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:1009)
at android.hardware.camera2.impl.ICameraDeviceUserWrapper.cancelRequest(ICameraDeviceUserWrapper.java:99)
at android.hardware.camera2.impl.CameraDeviceImpl.stopRepeating(CameraDeviceImpl.java:1251)
at android.hardware.camera2.impl.CameraCaptureSessionImpl.close(CameraCaptureSessionImpl.java:578)
at android.hardware.camera2.impl.CameraCaptureSessionImpl$2.onDisconnected(CameraCaptureSessionImpl.java:789)
at android.hardware.camera2.impl.CameraDeviceImpl$7.run(CameraDeviceImpl.java:245)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: android.os.ServiceSpecificException: cancelRequest:459: Camera 0: Error clearing streaming request: Function not implemented (-38) (code 10)
at android.os.Parcel.createExceptionOrNull(Parcel.java:2387)
at android.os.Parcel.createException(Parcel.java:2357)
at android.os.Parcel.readException(Parcel.java:2340)
at android.os.Parcel.readException(Parcel.java:2282)
at android.hardware.camera2.ICameraDeviceUser$Stub$Proxy.cancelRequest(ICameraDeviceUser.java:732)
at android.hardware.camera2.impl.ICameraDeviceUserWrapper.cancelRequest(ICameraDeviceUserWrapper.java:97)
For info:
Here are some random interesting settings from my gradle files:
classpath 'com.android.tools.build:gradle:3.3.3'
classpath 'com.google.gms:google-services:4.1.0'
...
multiDexEnabled
renderscriptTargetApi 23
renderscriptSupportModeEnabled false
...
ndkVersion '20.1.5948944'
...
ndk {
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
moduleName "my_lib"
ldLibs "log"
}
What could be the issue?

Exception in Android App: Failed resolution of: Lorg/jacoco/agent/rt/internal_8ff85ea/Offline;

Problem
So I integrated Jetpack Compose dependencies in the application module. But the below exception is occurring whenever the app is started/launched. It's failing in the Application class.
Stacktrace:
2021-10-22 11:16:01.079 16281-16281/com.example E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example, PID: 16281
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jacoco/agent/rt/internal_8ff85ea/Offline;
at com.example.app.MyApplication.attachBaseContext(MyApplication.java:719)
at android.app.Application.attach(Application.java:361)
at android.app.Instrumentation.newApplication(Instrumentation.java:1159)
at android.app.LoadedApk.makeApplication(LoadedApk.java:1324)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7223)
at android.app.ActivityThread.access$1600(ActivityThread.java:298)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2172)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:264)
at android.app.ActivityThread.main(ActivityThread.java:8248)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.jacoco.agent.rt.internal_8ff85ea.Offline" on path: DexPathList[[zip file "/data/app/~~MsNoI2GIvO6hDqGPC9BKfw==/com.example-jknI-wJelwi0a-NSFCz0ig==/base.apk"]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.example.app.MyApplication.attachBaseContext(MyApplication.java:719)
at android.app.Application.attach(Application.java:361)
at android.app.Instrumentation.newApplication(Instrumentation.java:1159)
at android.app.LoadedApk.makeApplication(LoadedApk.java:1324)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7223)
at android.app.ActivityThread.access$1600(ActivityThread.java:298)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2172)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:264)
at android.app.ActivityThread.main(ActivityThread.java:8248)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)
Suppressed: java.io.IOException: No original dex files found for dex location (arm64) /data/app/~~MsNoI2GIvO6hDqGPC9BKfw==/com.example-jknI-wJelwi0a-NSFCz0ig==/split_config.arm64_v8a.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:379)
at dalvik.system.DexFile.<init>(DexFile.java:112)
at dalvik.system.DexFile.<init>(DexFile.java:85)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:439)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:398)
at dalvik.system.DexPathList.<init>(DexPathList.java:166)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:129)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:104)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:74)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:87)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:116)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:114)
at android.app.ApplicationLoaders.getClassLoaderWithSharedLibraries(ApplicationLoaders.java:60)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:981)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:1038)
at android.app.LoadedApk.getResources(LoadedApk.java:1270)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2750)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2742)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7128)
2021-10-22 11:16:01.080 16281-16281/com.example E/AndroidRuntime: ... 8 more
Suppressed: java.io.IOException: No original dex files found for dex location (arm64) /data/app/~~MsNoI2GIvO6hDqGPC9BKfw==/com.example-jknI-wJelwi0a-NSFCz0ig==/split_config.xxhdpi.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:379)
at dalvik.system.DexFile.<init>(DexFile.java:112)
at dalvik.system.DexFile.<init>(DexFile.java:85)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:439)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:398)
at dalvik.system.DexPathList.<init>(DexPathList.java:166)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:129)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:104)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:74)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:87)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:116)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:114)
at android.app.ApplicationLoaders.getClassLoaderWithSharedLibraries(ApplicationLoaders.java:60)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:981)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:1038)
at android.app.LoadedApk.getResources(LoadedApk.java:1270)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2750)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2742)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7128)
... 8 more
My Setup
IDE: Android Studio Arctic Fox - Stable | Patch 3
Java JDK 11
Kotlin 1.5.30
Jetpack Compose 1.0.3
Android Gradle Plugin 7.0.2
Gradle Wrapper Version 7.0.2
JaCoCo Version 0.8.7
build.gradle:
jacoco {
toolVersion = "0.8.7"
}
android {
...
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
}
buildTypes {
debug {
testCoverageEnabled true
}
}
The solution to the issue is very interesting.
Our project has remote submodules which were also using JaCoCo and in the main project we upgraded the Android Gradle Plugin version and not upgraded AGP in remote submodules then this issue was occurring. This is because those submodules also use the JaCoCo plugin.
Once we upgraded all submodules which were using the JaCoCo plugin and updated respective versions in the main application, this issue got resolved.
Earlier we were using AGP 4.2.2 and this issue was coming after upgrading AGP to 7.x.x.

Resource linking fails on lStar with error

I'm working on a android Native application. My Android builds began to fail without any changes.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':etndoorcontrol:processHesuan_faceDebugResources'.
> Android resource linking failed
C:\Users\xqf\.gradle\caches\transforms-2\files-2.1\fe7b90aa462d9a2e04dd8216aa450a51\res\values\values.xml:2422:5-2449:25: AAPT: error: resource android:attr/lStar not found.
error: failed linking references.
Then I tried 2 solutions
//soultion 1.
configurations.all {
resolutionStrategy {
// Java language implementation
force "androidx.core:core:1.6.0"
// Kotlin
force "androidx.core:core-ktx:1.6.0"
}
}
After I add this to app/build.gradle, the app can build correct.but after I install the apk and run .there is a new problem.
java stacktrace:
java.lang.NoClassDefFoundError: androidx.appcompat.widget.Toolbar
at libcore.reflect.InternalNames.getClass(InternalNames.java:55)
at java.lang.Class.getDexCacheType(Class.java:2551)
at java.lang.reflect.AbstractMethod.getParameterTypes(AbstractMethod.java:169)
at java.lang.reflect.Method.getParameterTypes(Method.java:193)
at org.greenrobot.eventbus.SubscriberMethodFinder.findUsingReflectionInSingleClass(SubscriberMethodFinder.java:163)
at org.greenrobot.eventbus.SubscriberMethodFinder.findUsingInfo(SubscriberMethodFinder.java:88)
at org.greenrobot.eventbus.SubscriberMethodFinder.findSubscriberMethods(SubscriberMethodFinder.java:64)
at org.greenrobot.eventbus.EventBus.register(EventBus.java:140)
at com.yarward.a10doorcontrol.homepage.HomePageActivity.initFields(HomePageActivity.java:334)
at com.yarward.base.mvp.view.BaseActivity.onCreate(BaseActivity.java:82)
at com.yarward.a10doorcontrol.homepage.HomePageActivity.onCreate(HomePageActivity.java:257)
at android.app.Activity.performCreate(Activity.java:6709)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2628)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2736)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1487)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6157)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
Caused by: java.lang.ClassNotFoundException: androidx.appcompat.widget.Toolbar
at java.lang.VMClassLoader.findLoadedClass(Native Method)
at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:742)
at java.lang.ClassLoader.loadClass(ClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at libcore.reflect.InternalNames.getClass(InternalNames.java:53)
... 22 more
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/view/MenuHost;
at java.lang.VMClassLoader.findLoadedClass(Native Method)
at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:742)
at java.lang.ClassLoader.loadClass(ClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at libcore.reflect.InternalNames.getClass(InternalNames.java:53)
at java.lang.Class.getDexCacheType(Class.java:2551)
at java.lang.reflect.AbstractMethod.getParameterTypes(AbstractMethod.java:169)
at java.lang.reflect.Method.getParameterTypes(Method.java:193)
at java.lang.Class.getDeclaredMethods(Class.java:1812)
at org.greenrobot.eventbus.SubscriberMethodFinder.findUsingReflectionInSingleClass(SubscriberMethodFinder.java:154)
... 18 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.core.view.MenuHost" on path: DexPathList[[zip file "/data/app/com.yarward.hesuanface-1/base.apk"],nativeLibraryDirectories=[/data/app/com.yarward.hesuanface-1/lib/arm, /data/app/com.yarward.hesuanface-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 28 more
After this, I tried the other solution, as below:
ext{
androidX = 1.6.0
}
but this is not working for me.
axel8888 thank your sir, yes, I have solved this problem. yes, you are right , when I try solution one again
configurations.all {
resolutionStrategy {
// Java language implementation
force "androidx.core:core:1.6.0"
// Kotlin
force "androidx.core:core-ktx:1.6.0"
}
}
and as you the problem is now in
androidx.appcompat:appcompat:1.4.0-alpha
so I checked the gradle dependencies, yes , even I used
androidx.appcompat:appcompat:1.3.1
but my project shows the version is 1.4.0-alpha. here is my solution
configurations.all {
resolutionStrategy.eachDependency { details ->
def requested = details.requested
if (requested.group == "androidx.appcompat") {
if (requested.name == "appcompat") {
details.useVersion "1.3.1"
}
}
}
}
and it worked, now my project can build and run correctly, thank you, sir!
Obveiously the problem is now in androidx.appcompat:appcompat:1.4.0-alpha. If your UI use Toolbar, you will get the MenuHost not found crash.BUT, evenif I use resolutionStrategy to force 'androidx.appcompat:appcompat:1.3.1', dependency still make it toandroidx.appcompat:appcompat:{strictly 1.4.0-beta01}
It still confuse me a lot.
SOLVED -- someone write a update code for appcompat before... now it can force to 1.3.1 and solve the problem
change
implementation 'androidx.appcompat:appcompat:1.4.0'
to
implementation 'androidx.appcompat:appcompat:1.3.1'
that's it
implementation 'androidx.appcompat:appcompat:1.4.1'
was causing the problem, going back to 1.3.1 worked.
implementation 'androidx.appcompat:appcompat:1.3.1'
ill update once I get an official solution.

java.lang.IncompatibleClassChangeError caused by R8 (AGP 7.0.0-beta02) [duplicate]

Tested Environment / Dependencies
Android Studio: Android Studio Arctic Fox Beta 2 and Bumblebee Canary 1
AGP: 7.1.0-alpha01
Firebase Analytics: com.google.firebase:firebase-analytics-ktx:19.0.0
Firebase Crashlytics: com.google.firebase:firebase-crashlytics-ktx:18.0.0
minifyEnabled: true
Proguard Config specifically for Firebase: None
What's happening
When I build my app with minifyEnabled = true and try to start the app, app crashes right after it launches with the following crash log:
2021-05-29 22:30:37.652 16541-16541/com.my.app.package.name E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.my.app.package.name, PID: 16541
java.lang.IncompatibleClassChangeError: Class j$.util.concurrent.i implements non-interface class e.a (declaration of 'j$.util.concurrent.i' appears in /data/app/~~xxxx==/com.my.app.package.name--xxxxxx==/base.apk!classes2.dex)
at com.google.firebase.components.x.<init>(:37)
at com.google.firebase.components.x.b(:44)
at com.google.firebase.components.n.t(:219)
at com.google.firebase.components.n.j(:138)
at com.google.firebase.components.n.<init>(:91)
at com.google.firebase.components.n.<init>(:45)
at com.google.firebase.components.n$b.e(:360)
at com.google.firebase.c.<init>(:427)
at com.google.firebase.c.p(:299)
at com.google.firebase.c.o(:267)
at com.google.firebase.c.n(:252)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(:51)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2388)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2358)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(:45)
at android.app.ActivityThread.installProvider(ActivityThread.java:7242)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6783)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6700)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7660)
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)
Notes
Configuring minifyEnabled = false fixes the issue and app can start as expected.
Maybe it is related or dup of: java.lang.IncompatibleClassChangeError caused by R8 (AGP 7.0.0-beta02).
We had similar crashes in release since AGP 7.0.0-alpha12. The crashes are gone after updating the desugaring library to version 1.1.5.
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}
More info: https://issuetracker.google.com/issues/189244205

React Native app bundle crash. Unable to load script

I released my app BUNDLE on Google Play, and it crash at beginning. If I install manually the APK it runs correctly.
This is the error I got:
2020-07-31 13:13:29.944 25035-25086/? E/AndroidRuntime: FATAL EXCEPTION: create_react_context
Process: com.xxxxxxx.xxxxxxx, PID: 25035
java.lang.RuntimeException: Unable to load script. Make sure you're either running a Metro server (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.
at com.facebook.react.bridge.CatalystInstanceImpl.jniLoadScriptFromAssets(Native Method)
at com.facebook.react.bridge.CatalystInstanceImpl.loadScriptFromAssets(Unknown Source:2)
at com.facebook.react.bridge.JSBundleLoader$1.loadScript(Unknown Source:10)
at com.facebook.react.bridge.CatalystInstanceImpl.runJSBundle(Unknown Source:18)
at com.facebook.react.q.a(Unknown Source:180)
at com.facebook.react.q.a(Unknown Source:0)
at com.facebook.react.q$e.run(Unknown Source:68)
at java.lang.Thread.run(Thread.java:764)
React Native version: 0.62.2
Android gradle plugin version: 3.5.2
Gradle version: 6.0.1
I recently changed the build version:
buildToolsVersion = "28.0.3"
minSdkVersion = 21
compileSdkVersion = 29
targetSdkVersion = 29

Categories

Resources