Author Topic: Unity ARM64 Unable to load DLL error  (Read 225 times)

teq

  • Posts: 41
Unity ARM64 Unable to load DLL error
« on: 18 Aug '19 - 16:34 »
Hi there! My setup:
Unity 2017.4.30f, IL2CPP, .Net 4.6, stripping code is disabled, Gradle builder, latest bass libraries.
I am trying to make arm64, but faced with this error:
Quote
DllNotFoundException: Unable to load DLL 'bass': The specified module could not be found.
      at Un4seen.Bass.Bass.BASS_SetConfig (Un4seen.Bass.BASSConfig option, System.Int32 newvalue) [0x00000] in <00000000000000000000000000000000>:0
      at Un4seen.Bass.Bass.InitBass () [0x00000] in <00000000000000000000000000000000>:0
      at ClipPlayer.InitBASS () [0x00000] in <00000000000000000000000000000000>:0
      at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.InvokeMoveNext (System.Object stateMachine) [0x00000] in <00000000000000000000000000000000>:0
      at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0
      at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0
      at IEnumeratorAwaitExtensions+CoroutineWrapper`1+<Run>c__Iterator0[

Gradle config
Proguard file also includes "-keep class com.un4seen.bass.** {*;}".
Here is apk's lib folder:


Any thoughts what could be source of this issue?
« Last Edit: 18 Aug '19 - 16:58 by teq »

radio42

  • Posts: 4655
Re: Unity ARM64 Unable to load DLL error
« Reply #1 on: 18 Aug '19 - 20:33 »
I am not a Unity or Linux specialist, but Bass.Net looks for a 'libbass.so' - in your folder it looks, that all files contains some 'v8s' or '_v8a' postfix?

teq

  • Posts: 41
Re: Unity ARM64 Unable to load DLL error
« Reply #2 on: 18 Aug '19 - 20:43 »
I am not a Unity or Linux specialist, but Bass.Net looks for a 'libbass.so' - in your folder it looks, that all files contains some 'v8s' or '_v8a' postfix?
Yes, i did it just for clarification (for myself). Its arm64 versions from downloads

Ian @ un4seen

  • Administrator
  • Posts: 21991
Re: Unity ARM64 Unable to load DLL error
« Reply #3 on: 19 Aug '19 - 12:54 »
As Bernd said, the BASS library filenames should not be changed, eg. leave it as "libbass.so". You should also include armeabi-v7a libraries (in "armeabi-v7a" subdirectory) for devices that don't run 64-bit Android.

teq

  • Posts: 41
Re: Unity ARM64 Unable to load DLL error
« Reply #4 on: 19 Aug '19 - 14:54 »
Thanks. Default names work.

teq

  • Posts: 41
Re: Unity ARM64 Unable to load DLL error
« Reply #5 on: 19 Aug '19 - 16:01 »
Can i use x86_64 for both 32 and 64 bit systems?
Also, can i use v7a for both v7a and simple armeabi versions?

Ian @ un4seen

  • Administrator
  • Posts: 21991
Re: Unity ARM64 Unable to load DLL error
« Reply #6 on: 19 Aug '19 - 16:43 »
No, x86_64 libraries cannot be used on 32-bit systems, and nor can armeabi-v7a libraries be used on armeabi systems. x86 libraries can run on 32-bit and 64-bit, so you could include that instead of x86_64 if you want to only include one of them (you can include both). Unless you need to support very old devices, you can ignore armeabi (I imagine Unity may not even support it).

teq

  • Posts: 41
Re: Unity ARM64 Unable to load DLL error
« Reply #7 on: 19 Aug '19 - 17:00 »
No, x86_64 libraries cannot be used on 32-bit systems, and nor can armeabi-v7a libraries be used on armeabi systems. x86 libraries can run on 32-bit and 64-bit, so you could include that instead of x86_64 if you want to only include one of them (you can include both). Unless you need to support very old devices, you can ignore armeabi (I imagine Unity may not even support it).
Thanks. I'am asking because Unity drops erros while building, if found the .so with the same name and architecture(x86_64 and x86 are the same for Unity). So i tried to change names, but seems this is wrong way.

teq

  • Posts: 41
Re: Unity ARM64 Unable to load DLL error
« Reply #8 on: 22 Aug '19 - 14:32 »
Hi there again  ;D If i am usingrm64-v8a version, should i use armeabi or armeabi-v7a, or usingrm64-v8a supports these architectures?

Ian @ un4seen

  • Administrator
  • Posts: 21991
Re: Unity ARM64 Unable to load DLL error
« Reply #9 on: 22 Aug '19 - 15:17 »
arm64-v8a will only work with 64-bit Android, so you should also include armeabi-v7a for 32-bit Android users.