Issue
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
Solution
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.
Answered By - CommonsWare
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.