I've used NDK cross compiled many different version of library and used them in my Android application. They just work fine, until final release of my app, my fellow worker have tested the application on his XiaoMi 4 and this error appeared.
First I thought it maybe because of some particular platform's library's lost, but soon after I extract the .apk file and find everything was actually there.
I have searched for google found nothing that can solve the problem.
PS: In my new version of application, I just changed few lines in my C library and all of them is just about if-else-return stuff. I'd never used any of those memcpy-memmove functions, let alone memmove4.
If anyone can explain this to me? what is __aeaib_memmove4 ?
So I finally solved the problem by upgrading the APP-PLATFORM in my Android.mk file from 8 to 17, which is my targetSDKversion, so the error is gone.
Related
I am using the project CSipSimple as a reference in my current project.
Project works fine until i have not tested it in the Android N.
I am getting strange errors when m running my project in Android N.
I have done some googling for that and came to know that by changing the complile SDK version for project will help me to get rid of this error but that thing wont help me in my case.
So any other workaround for this ?
It would be grateful to suggest any changes/guidelines to avoid this issue.
Thanks in advance
Before API 23, this error Text Relocations was given as warning, so it does not cause problems. From API 23 it was thrown as error. The .so file with text relocation may have memory leaks. So it must be fixed and recompiled with latest Android NDK.
Quick fix will be to set tagetApiVersion to 22 in build.gradle file.
I'm new to developing for Android and using Spatialite and can't figure out why my app is crashing on a few devices because of this error:
java.lang.UnsatisfiedLinkError: No implementation found for void jsqlite.Database.internal_init() (tried Java_jsqlite_Database_internal_1init and Java_jsqlite_Database_internal_1init__)
at jsqlite.Database.internal_init(Native Method)
at jsqlite.Database.(Database.java:25)
This crash report is from a Nexus 5 (hammerhead) with Android 6.0 but it's been reported on Xoom with Android 4.1 and a few other unknown devices. I think it maybe be related to NDK versions as mentioned in these issues:
Adding ".so" library to my android studio project
Android NDK java.lang.UnsatisfiedLinkError: findLibrary returned null
https://bitbucket.org/almworks/sqlite4java/issues/71/arm64-bit. (although this is for sqlite4java)
Other than that I'm also getting this error/warning (depending on the device): libjsqlite.so has text relocations. This is wasting memory and prevents security hardening. Please fix. Although it doesnt crash the app like the other error.
I solved it by setting in the app built.gradle (or in the AndroidManifest.xml) this:
targetSdkVersion 21
And it works!
I know that it isn't a good solution, it's a patch, but i works!
***UPDATE
If you can't change the target version to 21, you can do the following:
Download the source code from:https://github.com/geopaparazzi/geopaparazzi
Clean all references in your project to spatialite, .war file, and jndi libraries
Copy module geopaparazzispatialitelibrary and integrate in your project
Clean the code that you don't need from the module
Compile, and enjoy your project targeting version 23
It's a bit complex process, but it works.
Expecially thanks to andrea antonello, he help me to solve the problem, and do a great job with spatialite.
In case this can help anyone with the same problem, I solved this by updating the jni libraries. To do this i downloaded this file:
https://github.com/geopaparazzi/libjsqlite-spatialite-android/blob/master/archive/20150616.libjsqlite.4.3.0.tar.bz2
from the geopaparazzi github repo which contains the latest version of the jni libraries as of now.
Replace the .so files in the spatialiteandroid library with the ones in the archive file.
You can find all versions of the library here: https://github.com/geopaparazzi/libjsqlite-spatialite-android/tree/master/archive:
I have been developing an application in Titanium android.Somehow after updating titanium i started getting the 65k limit error and the solution i got is :
https://www.contentful.com/blog/2014/10/30/android-and-the-dex-64k-methods-limit/
But how to implement these in Titanium ?
this question was asked and an issue was created in 2014: https://jira.appcelerator.org/browse/TIMOB-18082
however, it is not resolved. (Under Titanium SDK 5.1.1.GA)
I met this problem today, and my solution is:
remove the unnecessary jar files!
Those jar files was referred by some java class, has huge methods ( more than 1k) but it will not be used at run time, so removing them will not cause app crash nor throw exceptions.
This is not an final solution, but kinda of trick. whatever, it works for me.
I want to use JavaCv with my App on Android.
Therefore I followed the advice here: https://github.com/bytedeco/javacv on how to install Android 2.2 or newer. As a result the following libraries can be found under \libs\armeabi:
libjniopencv_core.so
libopencv_core.so
All classes of both libraries are also present in the classes.dex file of my .apk.
And still i get the following exception:
java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libopencv_core.so" needed by "libjniopencv_core.so"; caused by load_library(linker.cpp:745): library "libopencv_core.so" not found
I tried loading libopencv_core.so via
System.loadLibrary("libopencv_core")
and
System.loadLibrary("opencv_core")
with the same outcome..
Any hint on how to solve this issue would be appreciated.
Edit1:
I had a look to see which .so files could actually be found under /data/app-lib/ccc.android.myappname...
Despite libopencv_core.so and other files can be found under lib/armeabi/ in my .apk only some of them are available for my activity under /data/app-lib/ccc.android.myappname. The others are just ignored for some unknown reason.
Can somebody help, i have no idea what is going on.
Thank you.
Here the solution i found:
I discussed this matter on the JavaCv board on Github:
https://github.com/bytedeco/javacv/issues/28
The Issue might be history with the next release, but for the meantime do as follows:
Before using JavaCv for the first time run:
static {
System.loadLibrary("tbb");
System.loadLibrary("opencv_core");
System.loadLibrary("jniopencv_core");
}
On some devices (or occasion) the intended load order get mixed up...
Does anyone know where the android compat libary is
located in xmlvm so I could copy it by myself to the project folder because this is
what I guess is missing, also would be provided by target=android-on-iphone but as mentioned below this target isn't available in the current build.
I had absolutely no problem installing xmlvm and getting in touch with the
demo/samples also all the demos worked perfectly for me.
But now im stuck at the last 4 errors in xcode, i migrated my android project via --
skeleton=android:migrate then cross-compiled it via --target=iphone and opened
up the project in Xcode. after few project setup changes the errors went down from
72 to 4 errors ;)
however the errors are importing file not found errors of compat libs, so this
should somehow get to be solved i think...
is it because --target=android-on-iphone wasnt used by me because this option
will copy the android compat libary to the project folder.. well i tried to use this
target mentioned in 2 documentations of xmlvm but in the actual build of xmlvm
this target however does not exist..
How to solve these errors?
Screenshots:
http://img526.imageshack.us/img526/8957/bildschirmfoto20120620u.png
http://imageshack.us/f/138/bildschirmfoto20120620u.png/
From what I can see, it looks like you are using part of the Android API which is not yet implemented.
Unfortunately it seems that you either need to rewrite your application or implement the API yourself.