“ Android NDK app failed to load library”
而我现在试图将这些答案转移到我的情况上几个小时,但它不起作用.
有人能帮我吗?
这是这个开源项目,我想尝试让它在我的模拟器上运行.
https://github.com/itskewpie/FreeRDP-android
FreeRDPActivity.java
package net.itskewpIE.freerdp;import androID.app.Activity;import androID.os.Bundle;public class FreeRDPActivity extends Activity { @OverrIDe public voID onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentVIEw(R.layout.main); } static { System.loadlibrary("freerdp"); } }
freerdp.c
#include <jni.h>#include <stdio.h>#include <freerdp/freerdp.h>Jstring Java_net_itskewpIE_freerdp_FreeRDPActivity_test(jnienv* env,jobject thiz ){ androID_main(); return (*env)->NewStringUTF(env,"HELLO");}
AndroID.mk
LOCAL_PATH := $(call my-dir)include $(CLEAR_VARS)MY_liBS_PATH=freerdp-1.0-nevo/libs/armeabi-v7aLOCAL_MODulE := freerdp-utilsLOCAL_SRC_fileS := $(MY_liBS_PATH)/libfreerdp-utils.aLOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/freerdp-1.0-nevo/includeinclude $(PREBUILT_STATIC_liBRARY)...
错误信息:
FATAL EXCEPTION: mainjava.lang.ExceptionInInitializerErrorjava.lang.class.newInstanceImpl(Native Method)java.lang.class.newInstance(Class.java:1319)androID.app.Instrumentation.newActivity(Instrumentation.java:1054)androID.app.ActivityThread.performlaunchActivity(ActivityThread.java:2097)androID.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)androID.app.ActivityThread.access0(ActivityThread.java:141)androID.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)androID.os.Handler.dispatchMessage(Handler.java:99)androID.os.Looper.loop(Looper.java:137)androID.app.ActivityThread.main(ActivityThread.java:5041)java.lang.reflect.Method.invokeNative(Native Method)java.lang.reflect.Method.invoke(Method.java:511)com.androID.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)com.androID.internal.os.ZygoteInit.main(ZygoteInit.java:560)dalvik.system.NativeStart.main(Native Method)java.lang.UnsatisfIEdlinkError: Couldn't load freerdp from loader dalvik.system.PathClassLoader[dexPath=/data/app/net.itskewpIE.freerdp-2.apk,libraryPath=/data/app-lib/net.itskewpIE.freerdp-2]: findlibrary returned nulljava.lang.Runtime.loadlibrary(Runtime.java:365)java.lang.System.loadlibrary(System.java:535)net.itskewpIE.freerdp.FreeRDPActivity.<clinit>(FreeRDPActivity.java:16)... 15 more解决方法 试试这个开源项目:
www.freerdp.com
总结以上是内存溢出为你收集整理的Android SDK应用无法加载库全部内容,希望文章能够帮你解决Android SDK应用无法加载库所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)