My honest opinion about Gemini in Android Studio
I can start with it’s better than the former Studio Bot but with some notes
When Gemini in Android Studio was released, I was curious about how different or similar the experience would be to Github Copilot. I can say I’m gladly happy with the approach taken.
First things first… we have the control
Something I dislike about Copilot is the sensation of being tracked constantly without any chance to restrict what the model can read or not.
From the beginning, you’re aware of the different options for making the model aware of your project in Gemini in Android Studio. You can decide between using Gemini in Android Studio only as a conversational chat box, letting the model get context about the current project, or letting the model get context about all your projects. Also, you can include .aiexclude files to restrict access over parts of your project or even the entire project from the model.
When you let the model access your project, you can also enable the option for Gemini to act as a copilot, providing suggestions to complete the code in the same way as Github Copilot does.
Accuracy of results
Gemini in Android Studio promises you some features like code generation, answering questions, finding resources, code optimization and analyzing crash reports. I’ve tested all of these features, and everything went well until I made some complex requests.
Asking for the generation of a Person data class is not the same as asking how I can solve a bug with the BottomSheetDialogFragment that provokes the sheet to move to the top of the screen when the size of any child component changes. When I tried for this last request, Gemini gave me several bad answers and suggestions, even inventing its own classes. It was a total disaster in terms of trust.
Not only with Gemini
This problem is not exclusive to Gemini but Github Copilot and Chat GPT also; you can ask them something complex, and these tools usually offer you results far from something real or valuable. Without enough experience, a developer can waste time finding which of those wrong answers is correct.
This situation made me think about how confident those repositories are consumed by these models to be trained. However, this topic could be covered in a different article.
My conclusion
For me, Gemini in Android Studio is a good tool. Even when you restrict access to your project, disabling any chance to offer a suggestion, the chat box will help you ask about references or even solve routine tasks, so you don’t need to abandon your IDE to open a browser and make a search for a reference.
Recently, I shared a talk about Gemini in Android Studio (in Spanish) with the Android community in Santiago, Chile. Here are the slides and the recording.