Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio broke up my build.gradle file after add a Fragment

Tags:

Using Android Studio 2.0 over El Capitan like the next screenshot said:
Android Studio 2.0 on El Capitan

I found a bug that I can't report: After add a Fragment to my project, AS screw up my module build.gradle file. I mean, before add the fragment they file looks like this screenshot:
build.gradle dependence screenshot

but after add the Fragment AS screw it in this way:
build.gradle dependence screenshot 2

The way to reproduce it is like I'm showing in next screenshot:
enter image description here

I can fix it manually, but its so annoying doing it every single time that I add a Fragment. Is there anyway to fix it?

I'm on Mac OX with El Capitan.

like image 943
MiguelHincapieC Avatar asked Apr 25 '16 15:04

MiguelHincapieC


People also ask

How do I fix gradle issues?

For this, you have to connect your PC to the internet and you have to open your Android studio. After opening your project click on the Sync Project with Gradle files option. This will automatically download the new Gradle files and will fix the issue which is caused by the Gradle files.


1 Answers

It is a still open bug, you can monitor it's state here

The bug is due to the comments in the dependencies section, a temporal fix could be to remove them from there. I placed the comments there for a reason too :)

like image 127
afj88 Avatar answered Jan 03 '23 04:01

afj88