문제 설명
JNI를 사용하는 JAR에 Android 라이브러리 패키징 (Packing an android library on a JAR that uses JNI)
기본 코드를 사용하는 Android Java 라이브러리가 있습니다. 이 자바 라이브러리를 클라이언트 프로젝트에 추가했습니다.
내 클라이언트 프로젝트의 libs 폴더에 네이티브 라이브러리를 복사하는 스크립트를 추가해야 합니까? 아니면 이 네이티브 라이브러리가 자바 라이브러리의 jar 안에 포함되어 있습니까?
자세한 내용이 필요하거나 이해가 안되는 부분이 있으면 알려주세요.
고마워
참조 솔루션
방법 1:
You should move .so files(libs, obj etc.) from your project(that will be JAR library) to main project(that will use your JAR library). After that, make *.JAR again and attach *.JAR to your main project. I solved this problem in this way. :) I hope my answer will be helpful. bye, VansFannel!
방법 2:
I don't know if you need support any longer. You don't need any scripts when you added the Android library project to your Android project. I have a similar configuration and it works fine.
For more information how to use the JNI, you can look here: Issues with SHA1 hash implementation in Android
(by VansFannel、cmcromance、CSchulz)