Reputation: 25
it giving me error <meow.meowbottomnavigation.MeowBottomNavigation /> in red, saying missing class even after entering these dependecies.
build.gradel(project)
buildscript {
repositories {
jcenter()
}
}
plugins {
id 'com.android.application' version '7.1.1' apply false
id 'com.android.library' version '7.1.1' apply false
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
}
build.gradel(app)
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.example.meowbotm"
minSdk 21
targetSdk 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.etebarian:meow-bottom-navigation:1.2.0'
}
i have also added following lines in gradel properties
android.useAndroidX=true
android.enableJetifier=true
i don't know what problem is, in YT and on websites its shows these dependecies are sufficent and meowbottom bar working.
Upvotes: 1
Views: 5222
Reputation: 11
you just need to add:
jcenter()" settings.gradle->dependencyResolutionManagement->repositories
like the img Failed to resolve: com.etebarian:meow-bottom-navigation:1.3.1
Upvotes: 1
Reputation: 41
You have to use this tag in your xml file to implement, then it will work. AS you are using 1.2.0 version.
<com.etebarian.meowbottomnavigation.MeowBottomNavigation
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/btm_nav"
android:layout_gravity="bottom"
app:mbn_backgroundBottomColor="@color/purple_200"
app:mbn_circleColor="@color/white"
app:mbn_selectedIconColor="@color/purple_200"
app:mbn_defaultIconColor="@color/white"/>
Upvotes: 2