react-native-background-timer
react-native-background-timer copied to clipboard
BackgroundTimerModule.java error
Hello, I have a problem with your lib.
When I run :
./gradlew build
CMD returns:
Task :react-native-background-timer:lint FAILED Ran lint on variant release: 3 issues found Ran lint on variant debug: 3 issues found Wrote HTML report to file:///Users/.../react-native-background-timer/android/build/reports/lint-results.html Wrote XML report to file:///Users/.../node_modules/react-native-background-timer/android/build/reports/lint-results.xml
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':react-native-background-timer:lint'.
Lint found errors in the project; aborting build.
Fix the issues identified by lint, or add the following to your build script to proceed with errors: ... android { lintOptions { abortOnError false } } ...
Errors found:
/Users/.../node_modules/react-native-background-timer/android/src/main/java/com/ocetnik/timer/BackgroundTimerModule.java:39: Error: Tag name should use a unique prefix followed by a colon (found rohit_bg_wakelock). For instance myapp:mywakelocktag. This will help with debugging [InvalidWakeLockTag] this.wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "rohit_bg_wakelock");
ENV:
`"react": "16.6.3",
"react-native": "0.58.3",
"react-native-background-timer": "2.1.1"`
Change rohit_bg_wakelock to my_app:rohit_bg_wakelock. Basically refer to this stackoverflow link and this should fix your problem
same here
ignore it
./gradlew build -x ':react-native-background-timer:lint'
same here
How to ignore linting issues in AppCenter when building application?