UnsatisfiedLinkError when using aar-file in Expo project - android

We've experienced issued when trying to link and *.aar file on Android when using Expo. We get everything to compile and build but on most Android devices we end up with a runtime UnsatisfiedLinkError crash where our native code doesn’t find the aar binary,
We use a library called Movesense mdslib. We’ve been able to get https://www.npmjs.com/package/react-native-mds (which itself uses mdslib) working with some minor tweaks in a non-Expo React Native project, but we want to use Expo for it’s superior developer experience.
With Expo we've tried both managed and bare workflows with both react-native-mds and our own https://github.com/zmartrest-ai/expo-mds which is inspired by the former. We’ve also tried aligning the architecture we’re building for (removing x86_64 to align with mdslib), different combinations of locations for the *.aar-file, different ndkVersions.
A minimal repo is set up at https://github.com/lordspace74/zrn which contains a react-native project with expo modules installed and manual linking of expo-mds.
This issue is also posted to Expo (where environment and output from Logcat is included)
Any help would be highly appreciated!

Related

Problem with Integration of an Existing Android Library When Building an Android Library

I need to build an Android library for use inside a Unity project. There's nothing different about the build process itself and I managed to build a simple plugin library I can use and I can see commands going in and information coming out.
But now I need to include an external library. I know the library works because I have a demo project, an app, that runs on the required device and does what it's supposed to do. But the instructions to integrate it into a project assume that it is an app and so, do not make much sense in my case.
I have scrolled through a dozen manuals about integrating android libraries but none of them seem to work. I would appreciate a set of instructions about how to integrate an external library in an android project, considering the project is, itself, a library, with respect to the latest Android Studio and build tools.

React Native Android to iOS migration

I have an Android app built from scratch using React Native. Can I migrate the same app to iOS? If so, how tough will it be?
The Android app is already built and working fine.
If the app is done in React Native, you could build it using Xcode, of course you need a Mac, https://facebook.github.io/react-native/docs/getting-started#xcode.
You can also try from command line
react-native run-ios
Remember that you still need to install Xcode and the tools needed to build on the simulator or your device.
Also remember that you might have to do some changes in your code, not always the code for android works in iOS, moreover if you are using native modules done by you or from a library.
A project written in react-native should, by default, work on iOS.
Normally tho, every package you have used, some styles still differs from each other from platform, some things are avaiable to do on Android and not on iOS, some things are avaiable on iOS and not on Android.
Some packages needs linking. Some needs additional steps to run on iOS changing some datas/informations using xcode. (like deep linking).
On react-native 0.60 you need to install the pods manually as it's not done by the autolinking, there are a lot things to check and it may not be automatic for the majority of the cases

Xamarin android release with multiple c++ abis in one package?

I have spent some time learning Xamarin and so far I am finding it a great tool. Now that I have finally got to the point of releasing my software I have hit a problem. Only a single version of my C++ dll is included in the android package (Arm64).
I am working with Visual Studio 2017. I added the C++ code as a 'C++ Shared Library (Android, IOS)' so that it compiles as part of my solution. I then add the reference to my xamarin android project to the android C++ project.
This compiles the dll and works well during development but when I come to release it with the 'Archive' option all I get is the one dll for the currently active ABI.
I thought this would simply be solved by doing a batch build of all ABIs but sadly that hasn't worked.
I have all the ABI options ticked in the android projects advanced options and I have not ticked the 'create separate packages for each ABI' option so I expect to see a .so file in each of the architecture folders of the APK.
Has anyone else experienced this issue before? I am at a loss as to what I need to do after going through all the Xamarin documentation and searching online. I don't really want to go down the route of adding the .so files directly as content to the project as I am still actively developing and having the dependency link between the two projects seems like the right way to do it. Perhaps I'm wrong?

Can I build Android apps with react native?

The recently launched react native features just iOS app example and docs.
Yes.
React Native for Android was released September 14th, 2015.
Docs: http://facebook.github.io/react-native/
No. You can't build Android apps with this release.
Facebook has indicated that they are working on an Android version, and famously said "give us 6 months", which some people have taken as a promise. I wouldn't base any important business decisions on the illusion that it will be unveiled when the 6 months is over, but you can at least take some hope in the fact that they're serious about making it production-ready before they give us access to it, and that it's not just a pie-in-the-sky hope.
Also, as others have pointed out, Facebook has already release apps that they've built with the Android version of React Native. So at least parts of it are ready for prime time.
UPDATE
Early support for React Native for Android has been pushed to GitHub!
As noted, there are several things that are currently not working if trying to port an application from iOS. But it's worth checking out.
https://github.com/facebook/react-native/commit/42eb5464fd8a65ed84b799de5d4dc225349449be
It is not aiming to be a cross platform, write-once run-anywhere, tool. It is aiming to be learn-once write-anywhere. -Colin Eberhardt, from Raywenderlich
Good news is that React Native for Android is finally here. (https://code.facebook.com/posts/1189117404435352)
while you can't do it right now, it shouldn't take that long.
The first React Native Android App has been published about two weeks ago in the play store as tweeted by the reactjs twitter account:
https://twitter.com/reactjs/status/615638361328349185
Great news! Now its possible!
"And so it happens, the commit we're waiting since about 6 months!" - usereact.com
Please read more on: http://www.reactnative.com/react-native-for-android/
Watch this video: https://www.youtube.com/watch?v=MNNR01NF290
I've tried out Facebook react native on Android and it really worked.
Simple Ubuntu install guide can be found here
Simple js files: link
Yes , We can now developed android apps too in react-native.
and some of the apps are already developed in react-native for android
suchs as:
1)F8
2)Facebook ads manager
3)Squad
4)Discovery VR
5)Ziliun etc..
and many more still counting.
Developers from around the world now opting react-native for mobile app development because of easy of use of JSX syntax.
and also it is commonly noted as simply the V in MVC.
Since React makes no assumptions about the rest of your technology stack, it's easily embeddable within an existing non-React Native app.
TLDR; Yes,
Detailed answer (As of November 2017)
React Native android application development is very stable and a good number of Android applications have been already built and used in production using React-Native.
You can find a showcase of applications here. Most of them have both IOS and Android versions.
You can also easily integrate your native Android java code to react-native. Refer here
As a developer who is building Android app using react-native with a lot of native java code dependencies, react-native runs stable and I found the documentation and community support is adequate.
Yes, it works for both the platforms ios and android, be sure to mention code entry points in app.js if it uses different code for different platforms. However native functions like native events or location manager need to be coded in native languages and then exported using RCT_EXPORT, you can find more about it in the docs
Sure,
Using React Native you can build real mobile app. real app means close to platform or simply can say 99% native app.react native provide easy way for building native android app using javascript for lucrative design.You have basic knowledge of android studio and error fixing in android studio related native module integration and good understanding of react.js then you can build android app using react native.
Basic Requirement for android app
1. Configure android studio please follow below link and avoid installation of python.
https://facebook.github.io/react-native/docs/getting-started .
2. for UI you will learn flex-box from official documentation.
I thing that is enough
Yes, not just with android but also with iOS using XCode
Yes, you can make real-world mob application with React-Native. React-Native is used to create a hybrid mobile application. In this, we write code in javascript which gets converted to swift for ios and java for android.
Yes, You can build the Android app using React Native. For this, you have to install Android Studio with all the required SDKs. You can run your React Native app in Android simulator by using Android Studio and command line both.
For command line, run the following command:
react-native run-android
Otherwise you can open the android project in Android Studio which is created by React Native in android folder and run the project from there.
Happy Coding.. :)
Yes, you can definitely build android apps using react-native.This is one of the great benefits of React Native. Before Facebook created it, you had to build your app twice and with different code : one for iOS using Swift or Objective-C and one for Android using Java or Kotlin.

How to compile FreeType2 for Tizen?

I'm developing a Native Tizen application which requires FreeType2 for drawing fonts.
I have searched all the documentation from http://www.freetype.org and the docs/ included in the archive from their website, but there is no info on how to do with.
I managed to build a static library for Android under Ubuntu. It works just fine on Android and I figured I could use that as well on Tizen.
Although the application compiles and the FT_Init_FreeType( &library ) succeeds, it crashes on FT_New_Face or FT_New_Memory_Face.
Anyone has an idea on how I could make a static library specifically for Tizen ?
It turns out that you can use the Install.Any from the docs to make your own project in Tizen IDE and build a custom library compiled for it.

Categories

Resources