0

My app runs fine on all devices when installed via usb. But when i upload the app bundle of my app to Google play, it does not work on some devices. And there is no crash report in Firebase Crashlytics.

I use native c++ library. I have all binaries for 32 and 64 bit processors. I thought it was the issue with 32 bit devices. But it also happens on 64 bit devices. I notice that it occurs only on devices with API 23. I upgraded one of my phones from 23 to 24 (Android 7.0). Then again downloaded the app from store. Now it works fine on that device.

I used to provide multiple APKs to PlayStore before. Everything was working fine then. Later i have migrated to AndroidX and App Bundle. Then this problems has arisen. What can be the problem? Any guess?

*** I have found that it is Renderscript problem. Log says

"java.lang.RuntimeException: Unable to create application com.example.app.ThisApplication: androidx.renderscript.RSRuntimeException: Loading of ScriptC script failed"

Why is this happening only after downloaded from PlayStore ???

Crash log:

Community
  • 1
  • 1
ZeroOneZero
  • 216
  • 3
  • 6
  • 2
    If your app is crashing then it must generate some crash log kindly update question with those crash stacktrace. From your statement only my guess would be, crash might be due to some deprecated API that you have used in your code. – Shadow Droid Jan 06 '20 at 05:40
  • Please tell me, how can i get the crash log of an app downloaded from PlayStore? – ZeroOneZero Jan 06 '20 at 05:54
  • Connect your device to machine with adb platform tools/ android studio and check logcat during crash. [Check if this helps you](https://stackoverflow.com/questions/3643395/how-to-get-android-crash-logs) – Shadow Droid Jan 06 '20 at 05:58
  • 1
    Kindly edit question and update it with complete stacktrace. Also check these links [link1](https://stackoverflow.com/questions/32786838/android-renderscript-support-library-error-loading-rs-jni-library) and [link2](https://stackoverflow.com/questions/33241195/android-renderscript-rsruntimeexception-loading-of-scriptc-script-failed-andr) – Shadow Droid Jan 06 '20 at 06:15
  • @ShadowDroid Check my updated question please and help. – ZeroOneZero Jan 06 '20 at 06:33
  • Did you checked link1 and link2 provided by me? Kindly look whether they are helping to fix the issue or not. – Shadow Droid Jan 06 '20 at 06:36
  • Thank you so much. I will check the links. Those seem helpful to me. I will let you know after applying those workarounds. – ZeroOneZero Jan 06 '20 at 06:55
  • @ShadowDroid It was the issue with Support Library AndroidX RenderScript. I moved from Support Library Render Script to General RenderScript. – ZeroOneZero Jan 07 '20 at 06:17
  • ok cool. Thank you for the info – Shadow Droid Jan 07 '20 at 06:20
  • @RakibulHasanRajib Sorry to be a bother again. I've implemented the same solution as you - but, then it seems to crash on SOME android 8.1 (Xiomi Redmi Go) and Some Android 5 devices (Galaxy S4) thought I'd give you a headsup. But, I could also have done it incorrectly – Zee Mar 27 '20 at 07:22

1 Answers1

1

I think this is related to this known issue: https://issuetracker.google.com/issues/135865273

The recommended workaround at the moment is to set the following property in your gradle.properties file:

android.bundle.enableUncompressedNativeLibs=false
Pierre
  • 10,813
  • 1
  • 23
  • 39
  • Thanks. But i have figured out my problem in another way. – ZeroOneZero Jan 21 '20 at 09:33
  • @RakibulHasanRajib What was the solution? I'm having the same issue. – Zee Mar 19 '20 at 14:06
  • @Zee My problem was with androidx and RenderScript and Renderscript Target Api. What is yours? – ZeroOneZero Mar 22 '20 at 08:57
  • @RakibulHasanRajib Thanks for getting back to me! It turns out, it was the same issue. Sorry I managed to solve it on Friday and forgot to come edit/remove my comment. – Zee Mar 23 '20 at 06:42
  • @RakibulHasanRajib OK, nevermind - I still seem to have the issue, but ONLY on a Xiomi Redmi Go (android 8.1). what a pain. – Zee Mar 23 '20 at 13:05