George, Thanks for the reply. What is the recommended way of including the iotivity libraries (all architectures) in an Android app?
If each architecture specific library (.aar file) is included as a dependency in the Gradle build file then a debug version of the app will run. However, a release build is not possible because of duplicate classes exist in the packaged classes.jar file. We’ve tried unpacking all .aar files and extracting out the shared objects (.so files) into an Android module, which will allow for a release .apk to be built. However, we now see runtime errors like: java.lang.UnsatisfiedLinkError: JNI_ERR returned from JNI_OnLoad in "/data/app/xxx.xxx.xxx/lib/arm/libocstack-jni.so” Basically, we need to support as many architectures as possible. From a client perspective, we need all architectures or the app is not useful. Getting back to your question, yes, we are interested in enabling a universalAPK. Thanks! Rod > On Sep 18, 2017, at 12:31 PM, Nash, George <george.n...@intel.com> wrote: > > Unfortunately there is no build option to build an Android library for a > single target architecture. > > There is an old jira ticket to enable building a “universalAPK” > https://jira.iotivity.org/browse/IOT-582 > <https://jira.iotivity.org/browse/IOT-582> > > I currently have it assigned to me. There was some work to get it enabled > (by a different developer) but unfortunately the work is so old that it > essentially needs to be done again from scratch. > > This is something that we would like to get done but I have not had the > development time to enable it. There is also a question about building and > verifying such a change. Our build system is already having a hard time > keeping up with all the different setups we are throwing at it. Adding in a > universalAPK could drastically increase the build time and complexity since > we have to build for all of the supported architectures then package them > into an .aar file. > > If you are interested in enabling a universalAPK build I would be happy to > help you out. > > George > > <>From: iotivity-dev-boun...@lists.iotivity.org > [mailto:iotivity-dev-boun...@lists.iotivity.org] On Behalf Of Rod Biresch > Sent: Thursday, September 14, 2017 11:06 AM > To: iotivity-dev@lists.iotivity.org > Subject: [dev] Android multiple target architectures > > The build instructions (https://wiki.iotivity.org/android_build_instructions > <https://wiki.iotivity.org/android_build_instructions>) document how to build > an Android library for a single target architecture. Is there support to > build all supported target architectures (i.e. 'x86', 'x86_64', 'armeabi', > 'armeabi-v7a', 'armeabi-v7a-hard', 'arm64-v8a’) in 1 .aar file? If not, is > there a workaround? > > Thanks, > Rod
_______________________________________________ iotivity-dev mailing list iotivity-dev@lists.iotivity.org https://lists.iotivity.org/mailman/listinfo/iotivity-dev