I do not consider this question to be a duplicate of this and this questions since they are mainly answered by this link and that is not adaptable for later versions of AS.
I can find good information on how to integrate Android NDK with Eclipse, but that Eclipse and ADT is now considered deprecated by Google.
When following the instructions to setup a project for the experimental gradle plugin I get numerous errors in the editor of type cannot Resolve symbol
for all the new additions as well as the error posted below after the build.
The build.gradle in project.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle-experimental:0.2.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And the build.gradle in app
apply plugin: 'com.android.model.application'
model{
android {
compileSdkVersion = 22
buildToolsVersion = "23.0.1"
defaultConfig.with {
applicationId = "se.einarsundgren.gstreamandroiddemo"
minSdkVersion.apiLevel = 22
targetSdkVersion.apiLevel = 22
versionCode = 1
versionName = "1.0"
buildConfigFields.with {
create() {
type = "int"
name = "VALUE"
value = "1"
}
}
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles += file('proguard-rules.pro')
}
}
android.productFlavors {
create("flavor1") {
applicationId = 'com.app'
}
}
android.sources{
main {
java {
source {
srcDir 'src'
}
}
}
}
android.ndk {
moduleName = "native"
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
}
The error I get when cleaning and rebuilding the project:
Error:A problem occurred configuring root project 'GstreamAndroidDemo'.
Could not resolve all dependencies for configuration ':classpath'. Could not resolve com.android.tools.build:gradle-experimental:0.2.0. Required by: :GstreamAndroidDemo:unspecified Could not resolve com.android.tools.build:gradle-experimental:0.2.0. Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle-experimental/0.2.0/gradle-experimental-0.2.0.pom'. Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle-experimental/0.2.0/gradle-experimental-0.2.0.pom'. peer not authenticated
How do I integrate the NDK with a project in Android Studio? The previously linked questions have answers valid for an earlier version (pre 1.3) and the instructions are not adaptable for AS 1.4
The Native Development Kit (NDK) is a set of tools that allows you to use C and C++ code with Android, and provides platform libraries you can use to manage native activities and access physical device components, such as sensors and touch input.
Go to Tools->SDK Manager (or Files->Settings->Appearance & Behavior->System Settings->Android SDK ). Then select the SDK Tools tab, and check the Show Package Details checkbox. You will see your NDK version.
Yes it is. The setting is there on Android Studio 1.5 preview 2 in Windows 10 as well.
that this setting where you can point to the location of the NDK is not included in the later versions.
Yes, it is, at least on Android Studio 1.4.1 on Linux:
How do I integrate the NDK with a project in Android Studio?
As far as I am aware, you follow the instructions.
UPDATE: With regard to your gradle-experimental
problems, 0.2.0 and newer versions certainly show up in jcenter
when you view their Web site. Make sure that you have followed the rest of the instructions, such as using Gradle 2.5.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With