在v23上找不到Symbol Manifest.permission.WRITE_EXTERNAL_STORAGE [英] Can not find Symbol Manifest.permission.WRITE_EXTERNAL_STORAGE on v23
问题描述
我正在使用以下build.gradle文件编译代码
I am compile code with following build.gradle file
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
要访问将照片保存到SDCARD中,我已经打开了V23的权限对话框
For accessing saving photo into SDCARD i have opened permission Dialog box for V23
如下面的屏幕截图
但是我遇到以下错误
找不到符号清单.permission.WRITE_EXTERNAL_STORAGE
我将sdkVersion设置为23,但是为什么我仍然遇到此错误
I have put sdkVersion to 23 but why i am still getting this error
推荐答案
最后,我发现Menifest文件是由Android Studio自动生成的
Finally I found that Menifest file is autogenerated by Android Studio
在AndroideMenifest中,我为ParsePushNotification编写了以下代码
In AndroideMenifest i have written following code for ParsePushNotification
<!--
IMPORTANT: Change "com.parse.starter.permission.C2D_MESSAGE" in the lines below
to match your app's package name + ".permission.C2D_MESSAGE".
-->
<permission android:protectionLevel="signature"
android:name="com.example.permission.C2D_MESSAGE" />
<uses-permission android:name="com.example.permission.C2D_MESSAGE" />
及以下清单文件已生成
因此,当我在下面编写代码时,就可以了
So when i have written code below it's works
android.Manifest.permission.WRITE_EXTERNAL_STORAGE
代替
Manifest.permission.WRITE_EXTERNAL_STORAGE
这篇关于在v23上找不到Symbol Manifest.permission.WRITE_EXTERNAL_STORAGE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!