I have received an old code, coded in 2014 and I was requested to update some functionalities.
I am having problems running the code, for it was built on Eclipse and now I imported it to Android Studio.
First of all, the code calls 3 libraries that are included in the project, one of them is in cpp. This is why I think it was needed to add the bundle-ndk.
I added: android.useDeprecatedNdk=true to gradle-wrapper.properties
These are the gradle files I currently have:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
}
}
allprojects {
repositories {
jcenter()
}
}
First Library Gradle
apply plugin: 'com.android.library'
android {
compileSdkVersion 16
buildToolsVersion "23.0.3"
defaultConfig {
minSdkVersion 5
targetSdkVersion 16
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
Second Library
apply plugin: 'com.android.library'
android {
compileSdkVersion 16
buildToolsVersion "23.0.3"
defaultConfig {
minSdkVersion 5
targetSdkVersion 5
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile project(':FirstLibrary')
compile 'com.android.support:support-v4:18.0.0'
compile files('libs/libGoogleAnalyticsV2.jar')
}
Third Library
apply plugin: 'com.android.library'
android {
compileSdkVersion 16
buildToolsVersion "23.0.3"
defaultConfig {
minSdkVersion 5
targetSdkVersion 7
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:18.0.0'
}
Module Gradle of Project
apply plugin: 'com.android.application'
android {
compileSdkVersion 8
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.application.id"
minSdkVersion 8
targetSdkVersion 17
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}
}
dependencies {
compile project(':secondLbrary')
compile project(':thirdLibrary')
}
Latest Error Received:
Error:Execution failed for task ':library:compileDebugNdk'.
Error: Your project contains C++ files but it is not using a supported native build system. Consider using CMake or ndk-build integration with the stable Android Gradle plugin: https://developer.android.com/studio/projects/add-native-code.html or use the experimental plugin: http://tools.android.com/tech-docs/new-build-system/gradle-experimental.
What can I do to investigate this?