itinance / itinance/react-native-fs

Build fails for react-native-fs: 'Namespace not specified' error on Android

Open
#1,255 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used [patch-package](https://github.com/ds300/patch-package) to patch `react-native-fs@2.20.0` for the project I'm working on.

Here is the diff that solved my problem:

```diff
diff --git a/node_modules/react-native-fs/android/build.gradle b/node_modules/react-native-fs/android/build.gradle
index ddef857..99f949c 100644
--- a/node_modules/react-native-fs/android/build.gradle
+++ b/node_modules/react-native-fs/android/build.gradle
@@ -15,6 +15,8 @@ buildscript {
apply plugin: 'com.android.library'

android {
+ namespace 'com.rnfs'
+
compileSdkVersion safeExtGet('compileSdkVersion', 26)
buildToolsVersion safeExtGet('buildToolsVersion', '26.0.3')

@@ -22,7 +24,7 @@ android {
minSdkVersion safeExtGet('minSdkVersion', 19)
targetSdkVersion safeExtGet('targetSdkVersion', 26)
versionCode 1
- versionName "1.0"
+ versionName '1.0'
}
lintOptions {
abortOnError false
```

This issue body was [partially generated by patch-package](https://github.com/ds300/patch-package/issues/296).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.