# Sets the minimum version of CMake required to build the native
# library. You should either keep the default value or only pass a
# value of 3.4.0 or lower.
cmake_minimum_required(VERSION 3.4.1)
# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds it for you.
# Gradle automatically packages shared libraries with your APK.
add_library( # Sets the name of the library.
test_jni
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
# Associated headers in the same location as their source
# file are automatically included.
src/main/jni/Hello.c )
# Searches for a specified prebuilt library and stores the path as a
# variable. Because system libraries are included in the search path by
# default, you only need to specify the name of the public NDK library
# you want to add. CMake verifies that the library exists before
# completing its build.
find_library( # Sets the name of the path variable.
log-lib
# Specifies the name of the NDK library that
# you want CMake to locate.
log )
# Specifies libraries CMake should link to your target library. You
# can link multiple libraries, such as libraries you define in the
# build script, prebuilt third-party libraries, or system libraries.
target_link_libraries( # Specifies the target library.
test_jni
# Links the target library to the log library
# included in the NDK.
${log-lib} )
没有合适的资源?快使用搜索试试~ 我知道了~
Android Studio JNI-CMake开发Demo
共31个文件
xml:7个
png:5个
java:3个
需积分: 10 31 下载量 129 浏览量
2016-11-09
11:13:31
上传
评论
收藏 95KB ZIP 举报
温馨提示
Android Studio JNI开发,使用的是CMake编译库文件,附属上我的博客说明,操作很简单 http://blog.csdn.net/u014316982/article/details/53070000
资源推荐
资源详情
资源评论
收起资源包目录
JNITest.zip (31个子文件)
JNITest
gradlew 5KB
settings.gradle 16B
gradle
wrapper
gradle-wrapper.properties 233B
gradle-wrapper.jar 52KB
local.properties 498B
gradlew.bat 2KB
gradle.properties 784B
.gitignore 127B
app
src
androidTest
java
com
iteast
jnitest
ExampleInstrumentedTest.java 766B
test
java
com
iteast
jnitest
ExampleUnitTest.java 412B
main
jniLibs
AndroidManifest.xml 680B
res
mipmap-hdpi
ic_launcher.png 3KB
mipmap-xxxhdpi
ic_launcher.png 10KB
mipmap-xhdpi
ic_launcher.png 5KB
mipmap-mdpi
ic_launcher.png 2KB
drawable
layout
activity_main.xml 795B
values-w820dp
dimens.xml 364B
values
colors.xml 214B
strings.xml 73B
styles.xml 394B
dimens.xml 216B
mipmap-xxhdpi
ic_launcher.png 8KB
jni
Hello.c 557B
com_iteast_jnitest_MainActivity.h 539B
libs
java
com
iteast
jnitest
MainActivity.java 856B
com_iteast_jnitest_MainActivity.h 539B
CMakeLists.txt 2KB
libs
.gitignore 8B
build.gradle 1KB
proguard-rules.pro 662B
build.gradle 598B
共 31 条
- 1
资源评论
北极星辰_
- 粉丝: 5
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功