正如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