Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

lib/arm64, /system/lib64, /vendor/lib64]]] couldn't find "libmain.so"

Discussion in 'Android' started by ctykaya, Nov 11, 2019.

  1. ctykaya

    ctykaya

    Joined:
    Sep 23, 2015
    Posts:
    12
    Any one could help about lib/arm64, /system/lib64, /vendor/lib64]]] couldn't find "libmain.so" error. How to fix it ? I submit my game a few days ago and I saw Fatal exception error on Crashlytics console. I switch to build setting to il2cpp and check both ARMv7 and ARM64. To check the lib files I unzipped the apk file and control the folder lib/arm64 and the libmain.so file is in the folder. So I cannot figure it out why I am getting this error. Please help.
     
    ehsancgstudio likes this.
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    This happens when application is incorrectly installed, and native libraries are missing. Google should deny such installation, but apparently it still happens.

    Is this Google Crash Analytics, if so, where it's reported - Installed from Play or Installed from Anywhere?

    Also please post more information, like device where it happens, Unity version etc.
     
  3. ctykaya

    ctykaya

    Joined:
    Sep 23, 2015
    Posts:
    12
    I submit my game and users installed from play store. I am using Unity 2019.2.11fb and take the build with this version. The error comes from Nexus 5X, Nexus 6P these devices. I take a screen shot of the libs from the unzipped APK. Are all necessary libs installed with APK ?

    Here is the crash analytics report
    Ekran Resmi 2019-11-13 01.34.38.png Ekran Resmi 2019-11-13 01.36.00.png
    Caused by java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.ctykaya.chessone-fwHedZ8UdsHKv8svbGvy5w==/base.apk"],nativeLibraryDirectories=[/data/app/com.ctykaya.chessone-fwHedZ8UdsHKv8svbGvy5w==/lib/arm64, /system/lib64, /vendor/lib64]]] couldn't find "libmain.so"
    at java.lang.Runtime.loadLibrary0(Runtime.java:1011)
    at java.lang.System.loadLibrary(System.java:1657)
    at com.unity3d.player.UnityPlayer.<clinit>:)10)
    at com.unity3d.player.UnityPlayerActivity.onCreate:)28)
    at android.app.Activity.performCreate(Activity.java:7009)
    at android.app.Activity.performCreate(Activity.java:7000)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
    at android.app.ActivityThread.-wrap11()
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6494)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    Do you upload app bundle or apk to Google Play, if app bundle, 2019.2.12 might have a fix for you

    Android: Fixed an application crash when an application is installed on SD card, and was built using app bundles. Also gradle.properties will now contain a new entry 'android.bundle.enableUncompressedNativeLibs=false'.


    You have the necessary libraries in your apk, but like mentioned in certain conditions, when installing app, none of the native libraries are copied, there's a bug on Google side.
     
  5. ctykaya

    ctykaya

    Joined:
    Sep 23, 2015
    Posts:
    12
    Thanks Tomas I upload app bundle. I am download the new version of Unity.
     
  6. DidzTM

    DidzTM

    Joined:
    Jan 30, 2018
    Posts:
    17
    Hi, I'm having the problem too with Unity 2019.2.11f1:
    Fatal Exception: java.lang.Error
    FATAL EXCEPTION [main] Unity version : 2019.2.11f1 Device model : Motorola Motorola One Vision Device fingerprint: google/bullhead/bullhead:5.1/LMY47D/OPM7.181205.001/5080180:userdebug/test-keys
    Caused by java.lang.UnsatisfiedLinkError
    dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.com.myapp.com/base.apk"],nativeLibraryDirectories=[/data/app/com.myapp.com/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libmain.so"

    I'm using app bundle on playstore.
     
    Last edited: Nov 23, 2019
  7. DidzTM

    DidzTM

    Joined:
    Jan 30, 2018
    Posts:
    17
    One more with weird stuff
    Fatal Exception: java.lang.Error
    FATAL EXCEPTION [main] Unity version : 2019.2.11f1 Device model : Google Pixel Device fingerprint: google/sailfish/sailfish:9/PQ3A.190801.002/5670241:user/release-keys

    Caused by java.lang.UnsatisfiedLinkError
    dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.myapp.com-MPoD6fIDHPSi4sVkR8wTfg==/base.apk"],nativeLibraryDirectories=[/data/app/com.myapp.com-MPoD6fIDHPSi4sVkR8wTfg==/lib/arm64, /system/lib64, /vendor/lib64]]] couldn't find "libmain.so"
     
  8. Nyankoooo

    Nyankoooo

    Joined:
    May 21, 2016
    Posts:
    144
    @Tomas1856 I'm still getting this crash with version 2019.2.12:

    Caused by java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.myapp.com-1/base.apk"],nativeLibraryDirectories=[/data/app/com.myapp.com-1/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libmain.so"
    at java.lang.Runtime.loadLibrary(Runtime.java:367)
    at java.lang.System.loadLibrary(System.java:1076)
    at com.unity3d.player.UnityPlayer.<clinit>()
    at com.unity3d.player.UnityPlayerActivity.onCreate()
    at com.google.firebase.MessagingUnityPlayerActivity.onCreate(MessagingUnityPlayerActivity.java:89)
    at android.app.Activity.performCreate(Activity.java:6251)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2371)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2478)
    at android.app.ActivityThread.-wrap11(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1346)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:5453)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:781)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:671)

    Crash happens on a Mi 9X, but only reported through Firebase
     
  9. drorriov

    drorriov

    Joined:
    Jun 7, 2014
    Posts:
    43
    Same here on Mi 9X :\
     
  10. ioanna316

    ioanna316

    Joined:
    Apr 14, 2014
    Posts:
    11
  11. Rutger

    Rutger

    Joined:
    Sep 17, 2013
    Posts:
    34
    Same issue is still present.

    FYI:
    - App Bundle
    - Built with latest 2018 LTS (2018.4.17f1)
    - Crash not (yet) visible in Google Play Console
    - Crashes reported in Firebase Crashlytics
    - Occurs on several brands/types of devices: for this version of our app currently only Motorola One Vision
    - But on a previous version of our app, built with 2018.4.12f1:
    - Samsung Galaxy J3, Wiko Rainbow, JPay JP5s, alps v6, Samsung Galaxy Grand Prime, xiaolajiao LA2-SN, LG L20, Samsung Galaxy Star Plus, Fero A4001 Plus, Lenovo A7-30GC, itel it1516 Plus, Samsung Galaxy J1, and the list goes on and on.
    - Also some crashes on emulators
    - Around 45% of the crashes happen on rooted devices
    - Many versions of Android: from 4.1.1 to 7.1.2

    I've downloaded some of the generated APKs, specific for the listed devices, via the Google Play Console to check for the presence of the "missing" file 'libmain.so'.
    But it was present in every one of the APKs, so the problem lies elsewhere.
     
    Last edited: Feb 27, 2020
  12. ehsancgstudio

    ehsancgstudio

    Joined:
    Dec 2, 2017
    Posts:
    1

    hi there , same as here on samsung A5(2017), can you solve that problem ?!
     
  13. thiagolrosa

    thiagolrosa

    Joined:
    Feb 22, 2017
    Posts:
    57
    I think this crashes happen when someone tries to install the bundle manually, not through the store, because I can see some crashes from x86 devices, which are not compatible with my game and the store would never show my app to these users.
     
  14. Rutger

    Rutger

    Joined:
    Sep 17, 2013
    Posts:
    34
    FYI Still happening in our latest release using Unity 2018.4.23f1
     
  15. andrefbr21

    andrefbr21

    Joined:
    Jan 27, 2013
    Posts:
    10
    Still happening in the latest LTS Unity 2018.4.24f1

    Screenshot 2020-07-21 at 12.06.44.png
     
    Rutger likes this.
  16. cdr9042

    cdr9042

    Joined:
    Apr 22, 2018
    Posts:
    163
    Happened to me. Crash instantly on open

    EDIT: I fixed it. Deleted the Assets\Plugins\Android\gradleTemplate.properties and Assets\Plugins\Android\mainTemplate.gradle

    Reason of crash: before I deleted those template files, these are the library files that is listed in Android Resolver Dependencies:

    Code (CSharp):
    1. <file>Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-analytics-unity/6.16.1/firebase-analytics-unity-6.16.1.aar</file>
    2.     <file>Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-analytics-unity/6.16.1/firebase-analytics-unity-6.16.1.pom</file>
    3.     <file>Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-app-unity/6.16.1/firebase-app-unity-6.16.1.aar</file>
    4.     <file>Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-app-unity/6.16.1/firebase-app-unity-6.16.1.pom</file>
    5.     <file>Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-config-unity/6.16.1/firebase-config-unity-6.16.1.aar</file>
    6.     <file>Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-config-unity/6.16.1/firebase-config-unity-6.16.1.pom</file>
    7.     <file>Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-crashlytics-unity/6.16.1/firebase-crashlytics-unity-6.16.1.aar</file>
    8.     <file>Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-crashlytics-unity/6.16.1/firebase-crashlytics-unity-6.16.1.pom</file>
    9.     <file>Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-instance-id-unity/6.16.1/firebase-instance-id-unity-6.16.1.aar</file>
    10.     <file>Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-instance-id-unity/6.16.1/firebase-instance-id-unity-6.16.1.pom</file>
    11.     <file>Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-messaging-unity/6.16.1/firebase-messaging-unity-6.16.1.aar</file>
    12.     <file>Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-messaging-unity/6.16.1/firebase-messaging-unity-6.16.1.pom</file>
    After I deleted the template files, these are the files that was added to Android Resolver Dependencies:

    Code (CSharp):
    1. <file>Assets/Plugins/Android/androidx.annotation.annotation-1.1.0.jar</file>
    2.     <file>Assets/Plugins/Android/androidx.arch.core.core-common-2.0.1.jar</file>
    3.     <file>Assets/Plugins/Android/androidx.arch.core.core-runtime-2.0.1.aar</file>
    4.     <file>Assets/Plugins/Android/androidx.asynclayoutinflater.asynclayoutinflater-1.0.0.aar</file>
    5.     <file>Assets/Plugins/Android/androidx.browser.browser-1.0.0.aar</file>
    6.     <file>Assets/Plugins/Android/androidx.collection.collection-1.0.0.jar</file>
    7.     <file>Assets/Plugins/Android/androidx.coordinatorlayout.coordinatorlayout-1.0.0.aar</file>
    8.     <file>Assets/Plugins/Android/androidx.core.core-1.2.0.aar</file>
    9.     <file>Assets/Plugins/Android/androidx.cursoradapter.cursoradapter-1.0.0.aar</file>
    10.     <file>Assets/Plugins/Android/androidx.customview.customview-1.0.0.aar</file>
    11.     <file>Assets/Plugins/Android/androidx.documentfile.documentfile-1.0.0.aar</file>
    12.     <file>Assets/Plugins/Android/androidx.drawerlayout.drawerlayout-1.0.0.aar</file>
    13.     <file>Assets/Plugins/Android/androidx.fragment.fragment-1.0.0.aar</file>
    14.     <file>Assets/Plugins/Android/androidx.interpolator.interpolator-1.0.0.aar</file>
    15.     <file>Assets/Plugins/Android/androidx.legacy.legacy-support-core-ui-1.0.0.aar</file>
    16.     <file>Assets/Plugins/Android/androidx.legacy.legacy-support-core-utils-1.0.0.aar</file>
    17.     <file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-common-2.0.0.jar</file>
    18.     <file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-2.0.0.aar</file>
    19.     <file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-core-2.0.0.aar</file>
    20.     <file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-runtime-2.0.0.aar</file>
    21.     <file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-service-2.0.0.aar</file>
    22.     <file>Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-2.0.0.aar</file>
    23.     <file>Assets/Plugins/Android/androidx.loader.loader-1.0.0.aar</file>
    24.     <file>Assets/Plugins/Android/androidx.localbroadcastmanager.localbroadcastmanager-1.0.0.aar</file>
    25.     <file>Assets/Plugins/Android/androidx.print.print-1.0.0.aar</file>
    26.     <file>Assets/Plugins/Android/androidx.room.room-common-2.1.0.jar</file>
    27.     <file>Assets/Plugins/Android/androidx.room.room-runtime-2.1.0.aar</file>
    28.     <file>Assets/Plugins/Android/androidx.slidingpanelayout.slidingpanelayout-1.0.0.aar</file>
    29.     <file>Assets/Plugins/Android/androidx.sqlite.sqlite-2.0.1.aar</file>
    30.     <file>Assets/Plugins/Android/androidx.sqlite.sqlite-framework-2.0.1.aar</file>
    31.     <file>Assets/Plugins/Android/androidx.swiperefreshlayout.swiperefreshlayout-1.0.0.aar</file>
    32.     <file>Assets/Plugins/Android/androidx.versionedparcelable.versionedparcelable-1.1.0.aar</file>
    33.     <file>Assets/Plugins/Android/androidx.viewpager.viewpager-1.0.0.aar</file>
    34.     <file>Assets/Plugins/Android/androidx.work.work-runtime-2.1.0.aar</file>
    So, for some reasons, androidx library wasn't added which caused the crash

    crash log
    Code (CSharp):
    1. java.lang.Error: FATAL EXCEPTION [main]
    2. Unity version     : 2019.4.8f1
    3. Device model      : Xiaomi Redmi 4X
    4. Device fingerprint: Xiaomi/santoni/santoni:7.1.2/N2G47H/V11.0.2.0.NAMMIXM:user/release-keys
    5. Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.name/base.apk"],nativeLibraryDirectories=[/data/app/com.name/lib/arm64, /data/app/com.name/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]] couldn't find "libmain.so"
    6.    at java.lang.Runtime.loadLibrary0(Runtime.java:984)
    7.    at java.lang.System.loadLibrary(System.java:1562)
    8.    at com.unity3d.player.UnityPlayer.<clinit>(Unknown Source)
    9.    at com.unity3d.player.UnityPlayerActivity.onCreate(UnityPlayerActivity.java:41)
    10.    at com.google.firebase.MessagingUnityPlayerActivity.onCreate(MessagingUnityPlayerActivity.java:91)
    11.    at android.app.Activity.performCreate(Activity.java:6857)
    12.    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
    13.    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2676)
    14.    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2784)
    15.    at android.app.ActivityThread.-wrap12(ActivityThread.java)
    16.    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1523)
    17.    at android.os.Handler.dispatchMessage(Handler.java:102)
    18.    at android.os.Looper.loop(Looper.java:163)
    19.    at android.app.ActivityThread.main(ActivityThread.java:6238)
    20.    at java.lang.reflect.Method.invoke(Native Method)
    21.    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:933)
    22.    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
     
    Last edited: Jan 22, 2021