yasirkula / UnityIonicIntegration

A guide to integrating Unity 3D content into an Ionic app and sending messages between them (for Android & iOS)(tested with Vuforia plugin)
104 stars 32 forks source link

Launcher does not work with a project with Ionic Storage #9

Closed Miojo closed 7 years ago

Miojo commented 7 years ago

Simple to reproduce. I created a blank project with a button to open my unity app (android). Worked no problems. Then added ionic storage to my project https://ionicframework.com/docs/storage/ : ionic cordova plugin add cordova-sqlite-storage npm install --save @ionic/storage

Rebuilt my app... then when trying to open unity got an error message "Failure to initialize Your hardware does not support this application, sorry" (all on my physical device, s7 edge)

I think the root of the problem is that storage adds a bunch of folders under "android>jnilibs" folder fff

Miojo commented 7 years ago

Some reference: https://forum.unity3d.com/threads/new-phone-unable-to-find-main-self-resolved.374473/

yasirkula commented 7 years ago

Unity provides a libunity.so file only for armeabi-v7a (32-bit ARM) architecture (and x86 architecture, if FAT or Intel is selected in Player Settings in Unity). 64-bit ARM architectures run 32-bit applications just fine as long as there are no 64-bit ARM specific plugins in your application; in which case, you receive the error you've posted.

To fix this issue, simply delete the arm64-v8a, armeabi and x86_64 folders from your jniLibs folder. It should not affect your application as your plugins most probably have libraries for armeabi-v7a and x86 architectures, as well.

Miojo commented 7 years ago

Worked! thanks :)