【发布时间】:2018-01-31 04:04:40
【问题描述】:
我正在尝试升级一个正常工作的旧应用程序以支持 Android API 26,我需要使用的东西之一是 android.support.v4.content.FileProvider - 但它没有找到。
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
由于早期的 Android 构建,gradle 文件看起来很简单。像添加依赖一样简单吗?我环顾四周,有人建议添加一个我不明白的 multidex。感谢您的帮助,谢谢!
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "virtualgs.spaint"
minSdkVersion 22
targetSdkVersion 26
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
【问题讨论】:
标签: java android android-fileprovider