0

When I change compileSdkVersion from 'android-N' and targetSdkVersion from 'N' both to the integer 21 in build.gradle minSdk(API, N preview ) != deviceSdk(API 21) is not solved. Any hints?

apply plugin: 'com.android.application'

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.noureddine_ouertani.www.wocelli40"
        minSdkVersion 15
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:24.0.0-beta1'
} 
  • I can't quite understand what you did. Can you show the changes of your build.gradle? – OneCricketeer Jun 12 '16 at 21:27
  • Post your build.gradle file – Giorgio Antonioli Jun 12 '16 at 21:32
  • I changed `'Android-N'` to 21 und `'N'` to 21 in this code `android { compileSdkVersion 'android-N' buildToolsVersion "23.0.3" defaultConfig { applicationId "com.noureddine_ouertani.www.wocelli40" minSdkVersion 15 targetSdkVersion 'N' versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } }` – Noureddine Ouertani Jun 12 '16 at 21:33
  • There is an "edit" link under your question. Please click it, then paste into your question the *current* contents of the `build.gradle` file. Also, you may need to clean your project after making the change that you describe. – CommonsWare Jun 12 '16 at 21:36
  • Did you run "Sync Project with Gradle files" after those changes? – Juan Cruz Soler Jun 12 '16 at 21:56
  • I just cleaned my project and saw the synchronization ongoing. I don´t see the error anymore. But I get my original problem which made me -among others- edit my `build.gradle` .... (http://stackoverflow.com/questions/37772799/errorexecution-failed-for-task-appmergedebugresources-java-lang-arrayind) I got this Error `Error:Execution failed for task ':app:processDebugResources'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Nouri\AppData\Local\Android\Sdk\build-tools\23.0.3\aapt.exe'' finished with non-zero exit value 1` – Noureddine Ouertani Jun 12 '16 at 22:04
  • Problem solved by creating a new Project and migrating my .java and my .xml files manually from the old one. – Noureddine Ouertani Jun 12 '16 at 23:09

0 Answers0