Skip to content
Advertisement

Tag: android-studio

Android Studio, define a JAVA_HOME variable

I saw a video on Youtube for enhancing the performance of Android Studio. I did and now I can’t launch my Android Studio. Now it gives an error saying that “If you already have a 64-bit JDK installed, define a JAVA_HOME variable in Computer > System Properties > System Settings Environment Variables. Failed to create JVM. JVM Path C:Program FilesAndroidAndroid

How can I switch between Fragments without destroying and re-creating them? (in a static-like way)

My app uses a BottomNavigationBar to switch between Fragments, and it does it this way: I want those Fragments to be static, so their content and views do not dissapear when I switch between them. I have tried to create them inside MainActivity’s onCreate() method, but it only helps with retaining text inside EditText widgets, the rest of the views

Modifying the scoring of a quiz app (android studio)

Context about the app: This is a sample 5 question test app that I made while I also learned firebase database just yesterday. The app is working perfectly and it does it needs to do, BUT what I wanna do next is that there are no right answers and each button corresponds to a score ex: Question: What are you

ANDROID STUDIO: this project is not a gradle-based project

I have downloaded this source code https://cdn.cs50.net/2019/fall/tracks/android/pokedex/pokedex.zip When I hit “sync project with gradle files”, it says that this project is not a gradle based project. I would be very thankful if someone can help me! Answer Make sure you open the project from its root directory. i.e. the directory which contains the top level build.gradle file. The missing top

Activity does not have a NavController set on

I basically set up 3 fragments for my bottom navigation view with all linked to activity.xml activity.xml where I put fragment tag. My Activity.java code (specifically): The problem now is that if I run that same java code using fragment tag in xml, it runs well but suggests I use <androidx.fragment.app.FragmentContainerView(linters) but on using <androidx.fragment.app.FragmentContainerView, it displays the error in

Advertisement