1

I've been coding around in android studio for a decent bit now. Recently an issue popped up where the project would be unable to compile and I traced down the error to a duplicate variable

public static final int GradientColor_fontVariationSettings = 13;
public static final int GradientColor_fontVariationSettings = 14;

in the file R.java. I removed this but since it is auto-generated, it simply adds it again and fails to compile once more. The error I am getting is variable GradientColor_fontVariationSettings is already defined in class styleable.

EDIT: I found the file and deleted the reference, but the issue is still occuring. Any ideas anybody

Aadit Kolar
  • 75
  • 1
  • 9
  • Please add the path of R.java to the question. It's for your package or android one? And class name which contains GradientColor_fontVariationSettings, for example `attr` etc. – Toris Jan 28 '19 at 14:21

2 Answers2

1

GradientColor_fontVariationSettings means fontVariationSettings attribute of GradientColor class. So, check res/attr, shapes in res/drawable folder which uses gradient and other gradient related resources. If nothing seems suspicious, check imported libraries.

If you want to find "GradientColor" or "fontVariationSettings" occurence in a / entire project, Android Studio has a menu "Find in path".

Refs.

Drawable resources - Shape drawable

GradientDrawable

Search all the occurrences of a string in the entire project in Android Studio

Updated:

Edit > Find > Find Usage may help to search usages.

Toris
  • 2,348
  • 13
  • 16
0

I am not sure, but you may find it under res folder

Ratish Bansal
  • 1,982
  • 1
  • 10
  • 19