Je suis en cours d'exécution Ubuntu 10.10Android Lien Erreur
Je ne suis pas en utilisant le NDK
Je compilé ma bibliothèque partagée ARM dans DS-5 (le jeu d'outils de développement ARM, http://www.keil.com/arm/ds5/). Quand je les ai placés sous libs/armeabi et appelez System.loadLibrary(), ils ne peuvent pas les trouver.
est ici la classe:
package org.me.testds5;
//a JNI wrapper class
public class WrapMyNative
{
static
{
//ERROR HERE
//note that calling
//System.loadLibrary("libAddSub"); generates the same error
System.loadLibrary("AddSub");
}
//some native functions
public native int add(int a, int b);
public native int sub(int n, int m);
}
nom exact de la bibliothèque est libAddSub.so
Le LogCat:
11-30 04:54:11.273: ERROR/AndroidRuntime(372): FATAL EXCEPTION: main
11-30 04:54:11.273: ERROR/AndroidRuntime(372): java.lang.ExceptionInInitializerError
11-30 04:54:11.273: ERROR/AndroidRuntime(372): at org.me.testds5.TestDS5.onCreate(TestDS5.java:13)
11-30 04:54:11.273: ERROR/AndroidRuntime(372): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
11-30 04:54:11.273: ERROR/AndroidRuntime(372): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
11-30 04:54:11.273: ERROR/AndroidRuntime(372): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
11-30 04:54:11.273: ERROR/AndroidRuntime(372): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
11-30 04:54:11.273: ERROR/AndroidRuntime(372): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
11-30 04:54:11.273: ERROR/AndroidRuntime(372): at android.os.Handler.dispatchMessage(Handler.java:99)
11-30 04:54:11.273: ERROR/AndroidRuntime(372): at android.os.Looper.loop(Looper.java:123)
11-30 04:54:11.273: ERROR/AndroidRuntime(372): at android.app.ActivityThread.main(ActivityThread.java:4627)
11-30 04:54:11.273: ERROR/AndroidRuntime(372): at java.lang.reflect.Method.invokeNative(Native Method)
11-30 04:54:11.273: ERROR/AndroidRuntime(372): at java.lang.reflect.Method.invoke(Method.java:521)
11-30 04:54:11.273: ERROR/AndroidRuntime(372): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-30 04:54:11.273: ERROR/AndroidRuntime(372): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-30 04:54:11.273: ERROR/AndroidRuntime(372): at dalvik.system.NativeStart.main(Native Method)
11-30 04:54:11.273: ERROR/AndroidRuntime(372): Caused by: java.lang.UnsatisfiedLinkError: Library AddSub not found
11-30 04:54:11.273: ERROR/AndroidRuntime(372): at java.lang.Runtime.loadLibrary(Runtime.java:461)
11-30 04:54:11.273: ERROR/AndroidRuntime(372): at java.lang.System.loadLibrary(System.java:557)
11-30 04:54:11.273: ERROR/AndroidRuntime(372): at org.me.testds5.WrapMyNative.<clinit>(WrapMyNative.java:7)
J'utilise une alternative au ndk car je n'arrive pas à obtenir le NDK pour construire un OpenGL ES. Je pense que les binaires seraient compatibles puisque ARM lui-même supporte la construction – Prime
La sortie de différents compilateurs n'est généralement pas compatible. Vous ne ciblez pas un noyau ARM nu, vous ciblez l'éditeur de liens android et le linux sur lequel il s'exécute. Je crois que Android a déjà un OpenGL ES, alors peut-être que vous pouvez créer un système de construction (ou plus) à partir de cela? –
besoin de changer le TARGET_PLATFROM: = 'android-4' – NebulaFox