i am beginner and learning android studio.
today i opened a new project in android studio and selected bottom navigation activity.
i haven't code any thing i just want to run this app but error occurs.
Update all dependencies to the latest version to solve the error. Check below dependencies also try to have kotlin version:
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0'
Most likely, one of your dependencies uses the kotlin version of the viewmodel library whereas your code uses the java version.
Related
I have recently updated my android studio to Stable Bumblebee version . I want to use Nav controller with safe args in my new android project .But as the Gradle plugin has changed to 7.1.0 , I am confused that where to add classpath dependency of safe args.
Can you please help ?
You can use this: id 'androidx.navigation.safeargs.kotlin' version '2.5.0-alpha01' apply false
I recently updated android studio and it's plugins, and all was working properly. But suddenly this happened and i can see how to solve. The app runs, but there are some unexpected behaviours. Tried to sync gradle, uninstall and reinstall the updates and nothing seems to work.
Activity.java for example
just remove your imports and make sure that they are importing from androidX
or enable auto-import from android studio setting and let it import it for you.
I don't get any error while gradle build but my MainActivity shows error across every AppCompatActivity related terms.
I noticed at the location of android-sdk the appcompat-v7 folder has till 26.0.0-alpha-1 only but I'm using API 28
Tried Every solution out there even tried reinstalling didn't help.
Yes going to previous versions is helping but why I won't be able to use API 28.
add this line in gradle
implementation 'com.android.support:appcompat-v7:28.0.0'
and change project settings to latest 4.4
I am a beginner in android development.
I am trying to add admob with firebase in my app but when I add firebase-ads dependency in gradle file, it causes the app to crash.
When I remove the dependency and run the project it works fine but when I add firebase-ads dependencyimplementation 'com.google.firebase:firebase-ads:17.1.2' then my app crashes.
Just use an older version, it happened to me too, so I downgrade it to 16.0.1 and now it works fine :D
As a beginner, use Firebase assistant from Tools > Firebase > AdMob to implement it automatically.
Not Able to add or remove new module or module dependency library in android studio 3.1.3 in earlier version its working fine. It is showing Internal IDE error while am trying to add or remove new library. I have already done invalidate caches and restart the android studio but still not able to add or remove.