1

Android studio is throwing an null pointer exception related to the Android Support plugin when opening. As a result I can't open layout resources xml files.

I've tried

  1. Invalidating Caches/ and restart
  2. Cleaning/rebuilding project
  3. Disabling Android SDK support plugin

Any help would be appreciated.Stack trace is below.

java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:658) at com.android.ide.common.resources.FileResourceNameValidator.getErrorTextForNameWithoutExtension(FileResourceNameValidator.java:135) at com.android.ide.common.resources.FileResourceNameValidator.getErrorTextForFileResource(FileResourceNameValidator.java:117) at com.android.ide.common.resources.FileResourceNameValidator.validate(FileResourceNameValidator.java:48) ...

1 Answers1

0

Based on your answer, I think you should make sure you have every files in your project directories. Try to debug buy going to Analyze --> Inspect Code

and let it run for a while. Any errors will be marked as red. Check it if one of the files have missing references like your case above. More can be found here,

https://developer.android.com/studio/write/lint#studio and;

How Do We Configure Android Studio to Run Its Lint on Every Build?

Infinite Loops
  • 671
  • 3
  • 11
  • 23