0

I am trying to implement bottom bar in my app . I have tried several libraries like

But the problem is I can't integrate any of those library when complied sdk version is less than 23 . If I try to integrate it , it says

/home/user/droid-work/TestBBar/app/build/intermediates/res/merged/debug/values-v23/values-v23.xml

Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.

Error:(34) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.

Error:Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/root/Android/Sdk/build-tools/22.0.1/aapt'' finished with non-zero exit value 1

Here is my build.gradle file

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.example.testbbar"
        minSdkVersion 16
        targetSdkVersion 22
        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:22.2.1'
    compile 'com.android.support:design:22.2.1'

    compile 'com.aurelhubert:ahbottomnavigation:1.3.3' 
    
   //or compile 'com.roughike:bottom-bar:1.4.0.1'

   //or compile 'it.sephiroth.android.library.bottomnavigation:bottom-navigation:1.0.7'

}
Community
  • 1
  • 1
Mithun Sarker Shuvro
  • 3,902
  • 6
  • 32
  • 64
  • Your compile SDK version must match the support library's major version. Since you are using version 23 of the support library, you need to compile against version 23 of the Android SDK. Alternatively you can continue compiling against version 22 of the Android SDK by switching to the latest support library v22. Courtsy:[Here](http://stackoverflow.com/questions/32075498/error-retrieving-parent-for-item-no-resource-found-that-matches-the-given-name) – LvN Jul 26 '16 at 06:58

1 Answers1

1

Correct. If you compile less than 23, then it doesn't know what v-23 is. There is no reason why not to compile with 23 or even 24, it is the targetSDKVersion that makes a difference, and you can leave it at 22
Also, make sure you add the MaterialCompat library to your app.

lionscribe
  • 3,413
  • 1
  • 16
  • 21