正如documentation提到的,WRITE_EXTERNAL_STORAGE权限不应该从API级别19.因此开始一个要求,我写这清单:KitKat仍然需要WRITE_EXTERNAL_STORAGE?
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18"/>
但是,运行我的应用程序时使用谷歌地图V2,因此需要访问外部存储,我得到一个SecurityException
:
java.lang.SecurityException: The Maps API requires the additional following permissions to be set in the AndroidManifest.xml to ensure a correct behavior:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
电话我运行应用程序是奇巧(4.4),这是API级别19.我的理解,应用程序应该能够未经许可即可正常运行。无论如何,为什么我会得到这个错误?
看看这篇文章:http://stackoverflow.com/questions/20328082/require-permission-only-for-older-android-versions-maxsdkversion-does-not-work – Willis