I was trying out some projects in Android Studio and I came across this error which I am not able to figure out. One of the layouts in the app is not rendering in the IDE. But it is visible if I run the app. There are no issues with other layouts in the app. Only the main layout, activity_main.xml has the problem. It is showing the following errors as well.
java.lang.reflect.InvocationTargetException
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
I already tried deleting Android Studio and Gradle cache, Clean, and Rebuild. Invalidate Caches / Restart did not work as well.
Please help me with this as I am stuck in my self-learning of Andriod development.
Delete below line from all EditText tags
android:autofillHints=""
XML Rendering will work fine.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.