Meine App-Beschreibungsdatei enthält:
Code: Select all
android:name="android.support.v4.content.FileProvider"
android:authorities="com.test.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
FREFunction-Code-Auszug:
Code: Select all
package com.test.OpenWithDefaultApp.functions;
.....
import android.content.Intent;
import android.net.Uri;
import android.support.v4.content.FileProvider;
.....
Uri contentUri = FileProvider.getUriForFile(context.getActivity(), "com.test.OpemWithDefaultApp.fileprovider", file);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(contentUri, fileType);
.....
context.getActivity().startActivity(intent);
.....
Code: Select all
Eclipse Luna 4.4.0
Eclipse Android Plugin 23.0.3
Android SDK Tools 23.0.2
Android SDK Platform-tools 20
Android SDK Build-tools 20
Android SDK from 14 upto 20
Android Support Library 20
Google Play services 19
Code: Select all
+android
-libs/android-support-v4.jar
-res/xml/file_paths
-library.swf
-openwithdefaultapp.jar
+default
-library.swf
-extension.xml
Code: Select all
java.lang.RuntimeException: Unable to get provider android.support.v4.content.FileProvider: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.FileProvider" on path: DexPathList[[zip file "/data/app/air.testFileProvider-2.apk"],nativeLibraryDirectories=[/data/app-lib/air.testFileProvider-2, /vendor/lib, /system/lib]]
Danke
Mobile version