Unable to start activity caused by NullPointerException at ContextImpl.openFileOutput

前端 未结 2 2000
傲寒
傲寒 2021-01-28 16:43

I\'ve released an app which uses the Android Compatibility Library for Google Maps (https://github.com/petedoyle/android-support-v4-googlemaps) and I\'ve received some odd \"Una

2条回答
  •  遇见更好的自我
    2021-01-28 17:38

    I had this error when I used the compatibility library. What I had was the project which targeted Android API 15, but I wanted the minimum version to be Android API 8, so I needed a few things from the compatibility library. I have attached the library, but forgot to use imports from it! When project was built, it was perfectly fine, but when I runned it on my phone which had Android 2.3.3 on it, it couldn't find some classes, because Android 2.3.3 just didn't have them! So, I suggest you to delete all imports, press Ctrl+Shift+O and whenever there will be a choice to use a normal Android build-in class or one from the compatibility library, always choose the second one. Tell me if it helped!

提交回复
热议问题