There are markings for rounding corners for the element. The project is located in the drawable directory called rounded_button_today.xml

 <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <corners android:bottomRightRadius="10dp" android:bottomLeftRadius="10dp" android:topRightRadius="10dp" android:topLeftRadius="10dp"/> </shape> 

BUT an error appears informing me that my color should start with # but I basically have no color, what's wrong ?:

 java.lang.NumberFormatException: Color value 'C:\Users\VorobeyAlex\AndroidStudioProjects\LoginApp\app\src\main\res\drawable\rounded_button_today' must start with # 
  • where do you drawable this drawable ? and sobsno what do you round corners? you have neither fill nor stroke, nothing to round the corners ... - xkor
  • I want to round the button. But for another button, the similar markup, only with the specified color, works correctly - Vorobey.A
  • You can round such corners with shape only angles of shape , but for this it should have not only rounding but also something that has these angles - fill, gradient and / or frame. And already on the button or on what other view this drawable will then be used is not important. - xkor
  • You won’t believe what helped me!) The file name consists of two '_', if one of them is removed, then everything works correctly)))) - Vorobey.A
  • If Instant Run (introduced in Android Studio 2.0) is not disabled, then not such miracles can be ( - xkor

1 answer 1

All that helped was renaming the file. As I understand it, the file consisting of two underscore characters yielded such an error)

  • It was necessary to clean the cache, you can at least 10 underscores, most likely it is the fault of the instant wounds - Chaynik