我知道有相关的答案,但它们已经过时了.我有Android Studio 1.3,已经下载了Android NDK.当我运行一个应用程序,它崩溃并给出了findLibrary returned null在Logcat.我发现这是因为没有.so库文件(如果我错了就纠正我).我的问题是 - 如何在Android Studio中生成.so文件?
是)我有的 -
注意 -如果.so必须使用Cygwin或构建库文件CMD,请告诉我如何操作.
我正在尝试使用android studio进行基本的ndk实现.现在我无法同步gradle我认为buid.gradle错过了一些配置
我收到这个错误
错误:无法加载类'com.android.build.gradle.managed.BuildType_Impl'.此意外错误的可能原因包括:
我的buid.gradle(app)
apply plugin: 'com.android.model.application'
model
{
android {
compileSdkVersion = 23
buildToolsVersion = "23.0.1"
defaultConfig.with {
applicationId = "com.example.app"
minSdkVersion.apiLevel = 9
targetSdkVersion.apiLevel = 23
versionCode = 1
versionName = "1.0"
}
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles += file('proguard-rules.txt')
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
android.ndk {
moduleName = "jniSample"
}
android.productFlavors {
// for detailed abiFilter descriptions, refer …Run Code Online (Sandbox Code Playgroud)