无法使用github bump demo在android中加载.so文件
我已经从github下载了bump demo,但当我运行它时,它一直在崩溃,错误日志为无法使用github bump demo在android中加载.so文件,android,shared-libraries,bump,Android,Shared Libraries,Bump,我已经从github下载了bump demo,但当我运行它时,它一直在崩溃,错误日志为 11-16 12:33:01.632: ERROR/AndroidRuntime(4298): FATAL EXCEPTION: main 11-16 12:33:01.632: ERROR/AndroidRuntime(4298): java.lang.UnsatisfiedLinkError: Library android-api not found 11-16 12:33:01.632: ERROR/
11-16 12:33:01.632: ERROR/AndroidRuntime(4298): FATAL EXCEPTION: main
11-16 12:33:01.632: ERROR/AndroidRuntime(4298): java.lang.UnsatisfiedLinkError: Library
android-api not found 11-16 12:33:01.632: ERROR/AndroidRuntime(4298): at
java.lang.Runtime.loadLibrary(Runtime.java:461)
11-16 12:33:01.632: ERROR/AndroidRuntime(4298): at
java.lang.System.loadLibrary(System.java:557)
11-16 12:33:01.632: ERROR/AndroidRuntime(4298): at com.bump.api.BumpAPI.<init>
(BumpAPI.java:122)
11-16 12:33:01.632: ERROR/AndroidRuntime(4298): at
java.lang.Class.newInstanceImpl(Native Method)
11-16 12:33:01.632: ERROR/AndroidRuntime(4298): at
java.lang.Class.newInstance(Class.java:1429)
11-16 12:33:01.632: ERROR/AndroidRuntime(4298): at
android.app.ActivityThread.handleCreateService(ActivityThread.java:2940)
11-16 12:33:01.632: ERROR/AndroidRuntime(4298): at
android.app.ActivityThread.access$3300(ActivityThread.java:125)
11-16 12:33:01.632: ERROR/AndroidRuntime(4298): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2087)
11-16 12:33:01.632: ERROR/AndroidRuntime(4298): at
android.os.Handler.dispatchMessage(Handler.java:99)
11-16 12:33:01.632: ERROR/AndroidRuntime(4298): at
android.os.Looper.loop(Looper.java:123)
11-16 12:33:01.632: ERROR/AndroidRuntime(4298): at
android.app.ActivityThread.main(ActivityThread.java:4627)
11-16 12:33:01.632: ERROR/AndroidRuntime(4298): at
java.lang.reflect.Method.invokeNative(Native Method)
11-16 12:33:01.632: ERROR/AndroidRuntime(4298): at
java.lang.reflect.Method.invoke(Method.java:521)
11-16 12:33:01.632: ERROR/AndroidRuntime(4298): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-16 12:33:01.632: ERROR/AndroidRuntime(4298): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-16 12:33:01.632: ERROR/AndroidRuntime(4298): at
dalvik.system.NativeStart.main(Native Method)
我想我遗漏了一些非常字符串的东西,但是我找不到任何这样的东西,或者找不到这个东西这就是我如何将bump库导入到我的项目中的方法,它可以工作
您是否尝试过
System.loadLibrary(“libgifflen”)
?@camobap yes..我在我的代码中也提到了这一点..在用onCreate Blocks封装的try catch中,我可以看到你对android api
libraryjava.lang.UnsatisfiedLinkError:library***android api***not found
是的,我已经看到了这一点,但我无法找到原因..我的其他项目正在运行我想我设置了错误的项目属性。所以我正在尝试设置这些属性。n让你知道asapi有我的lib结构,如下所示:libs包含android-support-v4.jar、bumpapi.jar和一个包含libgifflen.soI的文件夹。我刚刚将BumpTest和bumpapi库项目放入.zip。我已经测试过了,它在我这方面很有效。只需确保将自己的API_密钥放在BumpTest MainActivity.java中即可
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
try {
//System.loadLibrary("mysharedlibrary");
//crashing on this line
System.loadLibrary("libgifflen.so");
} catch (UnsatisfiedLinkError use) {
Log.e("JNI", "WARNING: Could not load libmysharedlibrary.so");
System.out.println("warning "+use.getMessage());
}
//.......some other code
}