Open brunogonncalves opened 4 years ago
This is also occurring for me.
@brunogonncalves can yoou elaborate your fix? I'm seeing that error but have not found android.enableUnitTestBinaryResources
EDIT:
Can confirm changing node_modules/@mauron85/react-native-background-geolocation/android/common/gradle.properties
fixes the build issue. It's unclear to me if this will break functionality?
This is also occurring for me. @brunogonncalves can yoou elaborate your fix? I'm seeing that error but have not found
android.enableUnitTestBinaryResources
EDIT: Can confirm changing
node_modules/@mauron85/react-native-background-geolocation/android/common/gradle.properties
fixes the build issue. It's unclear to me if this will break functionality?
For me worked without break any thing, just remove android.enableUnitTestBinaryResources
line from file node_modules/@mauron85/react-native-background-geolocation/android/common/gradle.properties
I put in my project an .sh
file to automatically remove this from the code to help my co-workers.
I fixed it without changing the package's files... I changed the build gradle version from 4.0.1
to 3.4.3
in android/build.gradle
and it worked.
Just add this to settings.gradle file include ':@mauron85_react-native-background-geolocation-common' project(':@mauron85_react-native-background-geolocation-common').projectDir = new File(rootProject.projectDir, '../node_modules/@mauron85/react-native-background-geolocation/android/common') include ':@mauron85_react-native-background-geolocation' project(':@mauron85_react-native-background-geolocation').projectDir = new File(rootProject.projectDir, '../node_modules/@mauron85/react-native-background-geolocation/android/lib')
I created fork to solve this issue. https://github.com/darron1217/react-native-background-geolocation
You can install it by command below
npm install https://github.com/darron1217/react-native-background-geolocation#develop
Just add this to settings.gradle file include ':@mauron85_react-native-background-geolocation-common' project(':@mauron85_react-native-background-geolocation-common').projectDir = new File(rootProject.projectDir, '../node_modules/@mauron85/react-native-background-geolocation/android/common') include ':@mauron85_react-native-background-geolocation' project(':@mauron85_react-native-background-geolocation').projectDir = new File(rootProject.projectDir, '../node_modules/@mauron85/react-native-background-geolocation/android/lib')
Solves this problem
Here is it in a better format:
include ':@mauron85_react-native-background-geolocation-common'
project(':@mauron85_react-native-background-geolocation-common').projectDir = new File(rootProject.projectDir, '../node_modules/@mauron85/react-native-background-geolocation/android/common')
include ':@mauron85_react-native-background-geolocation'
project(':@mauron85_react-native-background-geolocation').projectDir = new File(rootProject.projectDir, '../node_modules/@mauron85/react-native-background-geolocation/android/lib')
Your Environment
Context
The project is not building for android
Expected Behavior
Should build correctly and generate a .apk and .aab files.
Actual Behavior
Receiving a log error when try to build app:
Possible Fix
I did many tests and I saw is just needed to remove
android.enableUnitTestBinaryResources
fromgradle.properties
Steps to Reproduce