My app is targeted to run on android 6 which doesn't allow to load shared libraries as I understand.
Have anyone encountered this problem and was able to successfully solve it?
java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/com.XXX.XXX-2/lib/arm/libiconv.so: has text relocations
Android 6 no longer supports dynamic linking of shared objects. Static linking still works. However, your problem is unrelated to that.
The library is not even loaded because of its text relocations.
This is due to an old bug in the Android NDK, back in 2012. Google believed it to be solved with Lollipop, then ignored user warnings that it wasn't. The bug resurfaced in later NDKs, all API versions >=22 are considered broken. Instead of fixing the issue, apps with text relocations are now simply forbidden to deploy.
First report:
https://code.google.com/p/android/issues/detail?id=23203
To avoid the problem, try compiling your app with API 21. Refer to your IDE documentation on how to target various OS versions.
Related
When I create a empty Android Studio Application, in there I have some questions:
What's the meaning of Failed to load stats. Value maybe out of date?
What's the meaning of support instant apps? If I check it, what will happen?
What's the meaning of androidx.* artifacts?
1)It couldn't load more recent stats on usage of various OS versions. Probably because Google has only been exporting them every few months lately, instead of weekly. Don't worry about this
2)Its a native app that can be loaded from a website (needs to be small) instead of being installed. If you don't know what it is, you probably don't need it.
3)Google recently rebranded the Support Library as androidx. This causes problems when some libraries use the support version of a class and some the androidx version. This tells the app to try to use the androidx libraries where dependencies want the support libraries.
Was recently doing a project and mid-way we had to lower the minimum supported SDK supported in the Android manifest. Some Android API's we use are not compatible the new lower minimum SDK. We only discovered these as run time crashes. Why wouldn't the Gradle and/or the Android IDE pick up these as warnings ? Normally, I see the warnings as I code it, but for code already written, I am not warned during compilation.
I would like to be able to re-compile my project, and get all the API warnings about the minimum supported SDK. I had done some research on Lint, and it testing with it, has not yielded any results beyond warning me about XML style incompatibilities. So, I can't seem to find it for Gradle, and Android IDE is not running through the existing code already written, and raising warnings. Is this possible ? If it is, can someone provide a solution.
On running a Xamarin Android application in debug mode, I am getting the below error:
System.MissingMethodException: bool
System.Collections.Generic.Stack`1.TryPop(!0&)
And it is happening at the below call in the application for the Unity based dependency injection code:
this.Container.Resolve<T>();
There is no more stack trace data is also coming out for this issue.
Surprising thing is that the same project is working fine in VS 2017 (15.7.4) and not in a machine I have with VS 2017 (15.8.8).
Any possible solutions or leads for solving this will be helpful.
UPDATE:
I just downgraded my VS 2017 to 15.7.6 now and I am getting the same error still with that too.
WORK AROUND:
Once I changed targeted Android version of my Xamarin Android csproj in the Application Manifest to 5.1, I am able to get through my app in debug bypassing this issue. But, not sure what exactly solved by that. But, still it does not work in any targeted version above 5.1.
It will be great if a permanent solution can be identified for this issue even in higher Android target versions.
I'm using Xamarin.Android to development application in my project. When I build app on all version bellow Android 7, no problem happens. But when running on Android 7. It happens error: Detected problem with app native libraries (please consult log for detail): libmonosgen-2.0.so: unauthorized access to "/system/lib/libsqlite.so".
How to fix it? Please help me!!!
Many thanks.
Changes have been made in regards to native linking which SQLite unfortunately is affected by as read here.
The the reason your application crashes is due to the fact, that Android Nougat now no longer allows to dynamically linking against non-NDK libraries; something which SQLite did previously. By updating SQLite, the issue should be resolved. Although, do note that other libraries that you use could be affected by this change as well.
You will also have to inspect every PInvoke that you do yourself.
If that's the case, then you also have to option of decreasing the targetSdkVersion in the manifest for your given Android project to 23. Doing so will simply write a warning to the console instead of throwing a runtime error.
A similar question has been asked for Android Studio. But I am an eclipse user.
I am including the Facebook SDK in my project. After adding the SDK, when I run the program, I get the error
Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl
I tried cleaning and the error persists. Any ideas how to solve this issue? Again, I am using eclipse.
This really should be just a warning that won't stop your compilation. I believe by default it will use the most recent version of the file in the path of your project. Since the facebook API might be a version behind the recent released version included in your project, you can either remove your version in the project and rely on theirs, ignore the warning or update them so they both have the same version of the compatibility library.