* Licensed under the Apache License, Version 2.0 (the "License") * Copyright (C) 2009 The Android Open Source Project # See the License for the specific language governing permissions and # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # distributed under the License is distributed on an "AS IS" BASIS, # Unless required by applicable law or agreed to in writing, software # You may obtain a copy of the License at # you may not use this file except in compliance with the License. # Licensed under the Apache License, Version 2.0 (the "License") Jni 폴더를 만들고, Android.mk, hello-jni.c NDK Sample 폴더에서 복사하거나, 아래와 같이 입력 한다.Īndroid.mk 파일 # Copyright (C) 2009 The Android Open Source Project * installation time by the package manager. The library has already been unpacked into * this is used to load the 'hello-jni' library on application Public native String unimplementedStringFromJNI() * Trying to call this function will result in a * currently loaded native libraries only the first time * as you want, their implementation is searched in the * you can declare as many native methods in your Java code * This is another native method declaration that is *not* * 'hello-jni' native library, which is packaged * A native method that is implemented by the * the text is retrieved by calling a native ** Called when the activity is first created. make-standalone-toolchain.sh -ndk-dir=/opt/android-ndk -platform=android-8 -install-dir=/opt/android-8-toolchainĬd ~/dev/android-ndk-r8/samples/hello-jni/jni Sudo chown user1:user1 -hR /opt/android-8-toolchainĮcho 'export TOOLCHAIN=/opt/android-8-toolchain' | tee -a ~/.bashrcĮcho 'export PATH=$TOOLCHAIN/bin:$PATH' | tee -a ~/.bashrcĮcho 'export CC=arm-linux-androideabi-gcc' | tee -a ~/.bashrc ![]() Tar xvjof 2Įcho 'export ANDROID_NDK_ROOT=/home/user1/dev/android-ndk-r8' | tee -a ~/.bashrcĮcho 'export ANDROID_SDK_ROOT=/home/user1/dev/android-sdks' | tee -a ~/.bashrcĮcho 'export PATH=$PATH:$ANDROID_NDK_ROOT:$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools' | tee -a ~/.bashrc
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |