Reputation: 410
I've downloaded support-v4-24.1.1.jar
and am trying to use FileProvider
, however, android:name
inside of the manifest is not detecting it. This is all within an Android Module so I can use it inside of Unity.
I looked inside the jar and Android >> Support >> V4 >> Content >> FileProvider.class exists. So I don't know why I'm getting an unresolved class error.
Any help would be greatly appreciated
Android Manifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.fileproviderplugin">
<application>
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="gov.navair.aurora.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/filepaths" />
</provider>
</application>
Build.Gradle (module level)
apply plugin: 'com.android.library'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 24
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation files('libs/support-v4-24.1.1.jar')
}
}
Upvotes: 0
Views: 249
Reputation: 1007409
That library is a few years old and probably should no longer be used. And implementation
is the wrong directive to use for code that you are exporting from a module.
Try this instead:
api "com.android.support:support-compat:28.0.0"
Upvotes: 1