This question might seem too basic but I'm struggling a lot about this stuff, please help me or guide me.
I downloaded opencv (open source computer vision) libraries and I want Android Studio to be able to use those libraries.
I checked this answer also-How to use opencv in android studio using gradle build tool?
but this answer talks about having opencv-android-sdk and nowadays I think opencv has not anything like opencv-android-sdk , so I couldn't follow that answer.
Now the main point is, what I downloaded and extracted has a folder named java , there is a opencv-320.jar file and two folder x86 and x64, x64 folder contains opencv_java320.dll file. I believe these two files are only files needed to get opencv libraries in Android Studio. But I don't know how it can be done. Please help me.
You should not be using any dll or jar file that is not specifically for Android.
OpenCV has an Android version: http://opencv.org/platforms/android/
Follow the instructions and example there in order to use it.
Related
There are some .so libraries and java code uses them for android.
I compile this java code within android studio to get an .aar file. I need to make binding for c# code fo Xamarin.Android using Visual Studio. So, while binding with java is working good, the java code throws exception:
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader
Through the seeing of full exception message I got that java code can't find .so files. In the Android Studio project .so libs are settled at ./lib/armeabi-v7a/, and the java code works well.
So, the question is: where should I put .so libs in C# binding library? Some inner scent tips me I should put it somewhere -- that's the way libraries work.
I've tried to put .so libraries in directory with my .dll, also deeper in ./lib/armeabi-v7a/, but it actually didn't help -- the exception was the same. I've tried to put them in the directory with my .aar file and also in the deeper directory in ./lib/armeabi-v7a/ but this is kinda of shamanism. it's also didn't help.
the problem was in the way I tried to check the work of program. My Android emulator didn't have the armeabi-v7a support. After I tried to change my emulator settings. it became laggy and very slow. The issue was to test an application on real device.
I am struggling to put my model in the Android studio.
In order to use my model in the Android studio, I also know that I need to put the libandroid_tensorflow_inference_java.jar and libtensorflow_inference.so files into the assets folder in Android Studio.
So I used git to download the tensorflow library and use it to build .so and .jar files.
During the creation of the .so file I faced a problem that I could not solve.
I installed the SDK in the Android studio according to the procedure, and since I currently only support NDK version 17 in the studio, I installed version 12 externally and unzipped it.
~/tensorflow/WORKSPACE
In order to build a bazel, I modified the content of WORKSPACE in the root folder of tensorflow as shown above. this
But I had to face these terrible errors.
this this
To solve this problem, I changed the NDK location and installed another version of NDK. I tried to take other actions but the error did not go away. I have been working from yesterday to solve this problem. I need your help.
It looks like you're missing the -std=c++11 flag.
Try passing this additional Bazel flag: --cxxopt=-std=c++11.
I am trying to set up android sdk in eclipse on my mac.
I have downloaded the Android Support Library, however, there is nothing i can import to the eclipse.
I have already read through related post, and "Support Library Setup" as well.
Most people are having problems after importing the support library to eclipse and link to their own android application project, but thats not my case.
I had been stuck for days and will be really appreciated if someone can help me to solve this out.
Screen cap of SDK Manager
Screen cap of of ../android-sdks/extras/android/m2repository/com/android/support/
You can find the *.aar file (this is archive file ).And unzip it and find jar files along with ressources files.after that you can add it to libs directory in your project.
I'm launching a game on Android device and getting this error. I`m using up to date Android version, also libgdx.
The library 'jinput-platform-2.0.5-natives-linux.jar' contains native libraries that will not run on the device.
The following libraries were found:
libjinput-linux.so
libjinput-linux64.so
Please help me understand what may cause the problem.
*.so files are native assemblies that are built for a particular architecture. If those *.so files were not built for android (and it seems as if they are not given the error) they will not work.
If there isn't a version for android already built, you can try to write an android version. This other SO question may be of assistance.
Okay, so I'm having difficulties implementing this Change log library into my android app in eclipse: https://github.com/gabrielemariotti/changeloglib
I tried using the clone url and importing the library into eclipse and then going into the properties of my android project and adding it as a library but that didn't work. I do not have Maven installed nor do I know anything about it. Is there a way I can just get a jar of this library somewhere? Can someone please help me? Thank you!
Its most likely not setup as an Android Library project and that is why it can't be accessed that way.
You can create the jar yourself though by using: https://stackoverflow.com/a/11289115/1784299 eclipse itself or running the jar command in a terminal. (Eclipse might be a little more user friendly if you don't use the terminal.
I would however highly recommend learning how to incorporate Maven in your projects because it is a huge time saver. If you migrate to Android Studio then Maven will become your best friend.
I answer here to help other devs with the same issue.
The library is built with the Android Studio folder structure.
I highly recommend to use the gradle build system to work.
Hovewer, you can build it locally with Eclipse.
All required steps are described here:
https://github.com/gabrielemariotti/changeloglib/blob/master/doc/BUILD.md#reference-this-project-as-a-library-in-eclipse.
It can be valid for a lot of libraries.
Eclipse uses src and res as source folders. Android Studio instead uses src/main/java and src/main/res as source folders.
So you have to mark the java folder as source (right click on folder -> Build-Path -> use as source folder)