react-native-background-timer icon indicating copy to clipboard operation
react-native-background-timer copied to clipboard

BackgroundTimerModule.java error

Open Miilla opened this issue 5 years ago • 4 comments

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"`

Miilla avatar Jul 21 '20 15:07 Miilla

Change rohit_bg_wakelock to my_app:rohit_bg_wakelock. Basically refer to this stackoverflow link and this should fix your problem

shandilya1998 avatar Jul 24 '20 18:07 shandilya1998

same here

VadimAndyyakov avatar Jun 28 '21 06:06 VadimAndyyakov

ignore it

./gradlew build -x ':react-native-background-timer:lint'

same here

hsuan1117 avatar Jul 24 '21 13:07 hsuan1117

How to ignore linting issues in AppCenter when building application?

ArturV93 avatar Apr 05 '24 13:04 ArturV93