Reputation: 83
I want to make navigation view from this tutorial tutor but I found a problem
cannot resolve design
ive read a lot similar question from stack overflow but that doesnt help me, ive tried to invaled chaces/restartd ive treid to rescyn gradle ive treid to delet libraries inside .idea still not work heres my gradle
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.lordbramasta.praktikum"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// implementation 'androidx.appcompat:appcompat:1.0.2'
// implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.android.support:appcompat-v7:28.0.+'
implementation 'com.android.support:support-v4:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
// androidTestImplementation 'com.android.test.ext:junit:1.1.0'
// androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.google.android.material:material:1.0.0-rc01'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
}
heres how I import it in my MainActivity
import android.support.design.widget.BottomNavigationView;
thank you so much
Upvotes: 0
Views: 699
Reputation: 15433
Your dependency is mixed of support library and AndroidX which is not right. Refactor it to AndroidX using Android Studio and remove duplicate dependency.
Refactor > Migrate to AndroidX and press Do Refactor
Upvotes: 1