Following on from my thread here, i have established that the IDE does not fully support .AAR android library files.
If an .AAR library contains a native .SO library file then the IDE will not compile that .SO file into your .APK.
Your app will fail with an UnsatisfiedLinkError.
Here is the file structure of my .AAR library:
The contents of the 'jni' folder must be compiled into my .APK but that does not happen.
Android fails to find the library 'pano_video_renderer' and my app crashes.
I have extracted the 'jni' folder, renamed it to 'lib' then added it to my library source (which i then compile with SLC).
In order to do that i had to create a new folder named 'additional' in my library source and add the 'lib' folder there:
Works perfectly but isn't ideal.
When Google update their GoogleVR .AARs i'll need to jump through hoops to update and recompile my library.
Can i ask Erel if the 'jni' folder is the only folder found in an .AAR that is not supported by the IDE?
Are there other .AAR folders that the IDE would ideally support?
If an .AAR library contains a native .SO library file then the IDE will not compile that .SO file into your .APK.
Your app will fail with an UnsatisfiedLinkError.
Here is the file structure of my .AAR library:
videowidget.aar\jni
videowidget.aar\jni\armeabi-v7a
videowidget.aar\jni\armeabi-v7a\libpano_video_renderer.so
videowidget.aar\res
videowidget.aar\AndroidManifest.xml
videowidget.aar\classes.jar
videowidget.aar\R.txt
The contents of the 'jni' folder must be compiled into my .APK but that does not happen.
Android fails to find the library 'pano_video_renderer' and my app crashes.
I have extracted the 'jni' folder, renamed it to 'lib' then added it to my library source (which i then compile with SLC).
In order to do that i had to create a new folder named 'additional' in my library source and add the 'lib' folder there:
MySourceFolder\additional
MySourceFolder\additional\lib
MySourceFolder\additional\lib\armeabi-v7a
MySourceFolder\additional\lib\armeabi-v7a\libpano_video_renderer.so
MySourceFolder\bin
MySourceFolder\libs
MySourceFolder\src
Works perfectly but isn't ideal.
When Google update their GoogleVR .AARs i'll need to jump through hoops to update and recompile my library.
Can i ask Erel if the 'jni' folder is the only folder found in an .AAR that is not supported by the IDE?
Are there other .AAR folders that the IDE would ideally support?