Created
May 16, 2014 03:58
-
-
Save peterhpchen/5e8e8ad8b81b3fd4d16d to your computer and use it in GitHub Desktop.
Android NDK test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ndk.dir=C\:/Android/android-ndk-r9d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ndk { | |
moduleName "MyLib" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javah -d jni -classpath {sdk_dir}\platforms\android-19\android.jar;..\..\build\classes\debug com.hpchen.testndk.app.MainActivity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static { | |
System.loadLibrary("MyLib"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* DO NOT EDIT THIS FILE - it is machine generated */ | |
#include "com_hpchen_testndk_app_MainActivity.h" | |
/* Header for class com_hpchen_testndk_app_MainActivity */ | |
/* | |
* Class: com_hpchen_testndk_app_MainActivity | |
* Method: getStringFromNative | |
* Signature: ()Ljava/lang/String; | |
*/ | |
JNIEXPORT jstring JNICALL Java_com_hpchen_testndk_app_MainActivity_getStringFromNative | |
(JNIEnv *env, jobject obj) { return (*env)->NewStringUTF(env, "Hello JNI !");} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public native String getStringFromNative(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment