NDK 文件未与 Gradle Android 同步
NDK files not syncing with Gradle Android
我正在 Beaglebone Black 上做一个项目,我已经在上面移植了 Android KitKat。现在我需要一个 android 应用程序来帮助我访问 beaglebone 上的那些 gpios 以进行项目。
所以我正在使用 android studio 1.3.1 为我的项目创建我的应用程序,因此要通过 android 访问硬件引脚,我必须为此使用 NDK。现在,当我尝试将 gradle 2.2.1 与我的 NDK 文件同步时,它会打印一个错误,我应该设置 android.useDeprecatedNdk=true。现在,当我这样做时,它再次显示未定义 DeprecatedNdk() 的错误。
虽然我已经从 android 开发者网站下载了最新版本的 NDK,即 android-ndk-r10e,但错误仍然存在。
以下是模块中的 build.gradle 文件。
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
defaultConfig {
applicationId "com.packt.gpio"
minSdkVersion 19
targetSdkVersion 19
ndk {
moduleName "packtHAL"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:19.+'
}
它显示的错误也是:
Error:(14, 0) Error: NDK integration is deprecated in the current plugin.
Consider trying the new experimental plugin. For details, see http://tools.android.com/tech-docs/new-build-system/gradle-experimental.
Set "android.useDeprecatedNdk=true" in gradle.properties to continue using the current NDK integration.
如果我将 属性 添加到文件中,则会显示以下错误:
Error:(6, 0) Gradle DSL method not found: 'useDeprecatedNdk()'
Possible causes:The project 'gpio' may be using a version of Gradle that does not contain the method.
The build file may be missing a Gradle plugin.
如果有人知道对此应该做什么。请分享您的想法。
谢谢
我正在 Beaglebone Black 上做一个项目,我已经在上面移植了 Android KitKat。现在我需要一个 android 应用程序来帮助我访问 beaglebone 上的那些 gpios 以进行项目。
所以我正在使用 android studio 1.3.1 为我的项目创建我的应用程序,因此要通过 android 访问硬件引脚,我必须为此使用 NDK。现在,当我尝试将 gradle 2.2.1 与我的 NDK 文件同步时,它会打印一个错误,我应该设置 android.useDeprecatedNdk=true。现在,当我这样做时,它再次显示未定义 DeprecatedNdk() 的错误。 虽然我已经从 android 开发者网站下载了最新版本的 NDK,即 android-ndk-r10e,但错误仍然存在。 以下是模块中的 build.gradle 文件。
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
defaultConfig {
applicationId "com.packt.gpio"
minSdkVersion 19
targetSdkVersion 19
ndk {
moduleName "packtHAL"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:19.+'
}
它显示的错误也是:
Error:(14, 0) Error: NDK integration is deprecated in the current plugin.
Consider trying the new experimental plugin. For details, see http://tools.android.com/tech-docs/new-build-system/gradle-experimental.
Set "android.useDeprecatedNdk=true" in gradle.properties to continue using the current NDK integration.
如果我将 属性 添加到文件中,则会显示以下错误:
Error:(6, 0) Gradle DSL method not found: 'useDeprecatedNdk()'
Possible causes:The project 'gpio' may be using a version of Gradle that does not contain the method.
The build file may be missing a Gradle plugin.
如果有人知道对此应该做什么。请分享您的想法。
谢谢