Open uendar opened 5 years ago
I think this it's due the android x update. Facing the same problem.
android x update , How to solve???
hi, you can try
@aybarsyalcin, it didnt work for me. @javiersuazo @levenies did you found a solution?
having the same issue any solution for this?
preBuild.doFirst {
ant.replaceregexp(match: 'android.support.v4.content', replace: 'androidx.core.content', flags: 'g', byline: true)
{
fileset(dir: '../../node_modules/react-native-doc-viewer/android/src/main/java/com/reactlibrary/', includes: '*.java')
}
}
Under android/app/build.gradle
file
Add between android
and dependencies
@Grewer Thanks, you save lot
node_modules\react-native-doc-viewer\android\src\main\java\com\reactlibrary\FileProviderClass.java:3: error: package android.support.v4.content does not exist public class FileProviderClass extends android.support.v4.content.FileProvider { ^ C:\Users\EndarUliu\Desktop\H\node_modules\react-native-doc-viewer\android\src\main\java\com\reactlibrary\RNReactNativeDocViewerModule.java:34: error: package android.support.v4.content does not exist import android.support.v4.content.FileProvider; ^ C:\Users\EndarUliu\Desktop\H\node_modules\react-native-doc-viewer\android\src\main\java\com\reactlibrary\RNReactNativeDocViewerModule.java:338: error: cannot find symbol Uri contentUri = FileProvider.getUriForFile(context, reactContext.getPackageName()+".docViewer_provider", result); ^ symbol: variable FileProvider location: class RNReactNativeDocViewerModule.FileDownloaderAsyncTask 3 errors