App Error JobIntentService
Sudhakar91221 opened this issue · comments
Hi Team
Getting below error in React native latest version(0.71.8)
Project Version details:
"react": "18.2.0",
"react-native": "0.71.8",
"react-native-boundary": "^1.1.1",
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\receivers\BoundaryEventBroadcastReceiver.java:6: error: cannot find symbol
import android.support.v4.app.JobIntentService;
^
symbol: class JobIntentService
location: package android.support.v4.app
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\RNBoundaryModule.java:7: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
^
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\RNBoundaryModule.java:8: error: cannot find symbol
import android.support.v4.app.ActivityCompat;
^
symbol: class ActivityCompat
location: package android.support.v4.app
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\services\BoundaryEventHeadlessTaskService.java:5: error: package android.support.annotation does not exist
import android.support.annotation.Nullable;
^
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\services\BoundaryEventJobIntentService.java:6: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
^
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\services\BoundaryEventJobIntentService.java:7: error: cannot find symbol
import android.support.v4.app.JobIntentService;
^
symbol: class JobIntentService
location: package android.support.v4.app
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\services\BoundaryEventJobIntentService.java:20: error: cannot find symbol
public class BoundaryEventJobIntentService extends JobIntentService {
^
symbol: class JobIntentService
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\services\BoundaryEventHeadlessTaskService.java:12: error: cannot find symbol
@nullable
^
symbol: class Nullable
location: class BoundaryEventHeadlessTaskService
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\services\BoundaryEventJobIntentService.java:30: error: cannot find symbol
protected void onHandleWork(@nonnull Intent intent) {
^
symbol: class NonNull
location: class BoundaryEventJobIntentService
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\RNBoundaryModule.java:60: error: cannot find symbol
public void onFailure(@nonnull Exception e) {
^
symbol: class NonNull
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\RNBoundaryModule.java:143: error: cannot find symbol
int permission = ActivityCompat.checkSelfPermission(getReactApplicationContext(), Manifest.permission.ACCESS_FINE_LOCATION);
^
symbol: variable ActivityCompat
location: class RNBoundaryModule
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\RNBoundaryModule.java:166: error: cannot find symbol
public void onFailure(@nonnull Exception e) {
^
symbol: class NonNull
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\RNBoundaryModule.java:175: error: cannot find symbol
int permission = ActivityCompat.checkSelfPermission(getReactApplicationContext(), Manifest.permission.ACCESS_FINE_LOCATION);
^
symbol: variable ActivityCompat
location: class RNBoundaryModule
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\RNBoundaryModule.java:200: error: cannot find symbol
public void onFailure(@nonnull Exception e) {
^
symbol: class NonNull
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\RNBoundaryModule.java:220: error: cannot find symbol
public void onFailure(@nonnull Exception e) {
^
symbol: class NonNull
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\RNBoundaryModule.java:228: error: cannot find symbol
ActivityCompat.requestPermissions(getReactApplicationContext().getCurrentActivity(),
^
symbol: variable ActivityCompat
location: class RNBoundaryModule
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\RNBoundaryModule.java:234: error: cannot find symbol
return ActivityCompat.checkSelfPermission(getReactApplicationContext(), Manifest.permission.ACCESS_FINE_LOCATION);
^
symbol: variable ActivityCompat
location: class RNBoundaryModule
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\receivers\BoundaryEventBroadcastReceiver.java:21: error: cannot find symbol
JobIntentService.enqueueWork(context, BoundaryEventJobIntentService.class, 0, intent);
^
symbol: variable JobIntentService
location: class BoundaryEventBroadcastReceiver
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\services\BoundaryEventJobIntentService.java:29: error: method does not override or implement a method from a supertype
@OverRide
^
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\services\BoundaryEventJobIntentService.java:46: error: cannot find symbol
sendEvent(this.getApplicationContext(), ON_ENTER, enteredGeofences);
^
symbol: method getApplicationContext()
D:\MySamples\RNGeofenceTesting\node_modules\react-native-boundary\android\src\main\java\com\eddieowens\services\BoundaryEventJobIntentService.java:54: error: cannot find symbol
sendEvent(this.getApplicationContext(), ON_EXIT, exitingGeofences);
^
symbol: method getApplicationContext()
21 errors
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
- What went wrong:
Execution failed for task ':react-native-boundary:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
- Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-
What went wrong:
java.lang.StackOverflowError (no error message) -
Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
==============================================================================
- Get more help at https://help.gradle.org
BUILD FAILED in 1m 21s
at makeError (D:\MySamples\RNGeofenceTesting\node_modules\execa\index.js:174:9)
at D:\MySamples\RNGeofenceTesting\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (D:\MySamples\RNGeofenceTesting\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:82:7)
at async Command.handleAction (D:\MySamples\RNGeofenceTesting\node_modules\@react-native-community\cli\build\index.js:108:9)
info Run CLI with --verbose flag for more details.
Here are steps to fix it -
- node_modules\react-native-boundary\android\src\main\java\com\eddieowens\receivers\BoundaryEventBroadcastReceiver.java
// import android.support.v4.app.JobIntentService; (comment this line)
import androidx.core.app.JobIntentService; (add this line)
- node_modules\react-native-boundary\android\src\main\java\com\eddieowens\services\BoundaryEventHeadlessTaskService.java
// import android.support.annotation.Nullable;
import androidx.annotation.NonNull;
public class BoundaryEventHeadlessTaskService extends HeadlessJsTaskService {
// @nullable (comment this line inside class)
...
}
- node_modules\react-native-boundary\android\src\main\java\com\eddieowens\services\BoundaryEventJobIntentService.java
// import android.support.annotation.NonNull;
// import android.support.v4.app.JobIntentService;
import androidx.annotation.NonNull;
import androidx.core.app.JobIntentService;
- node_modules\react-native-boundary\android\src\main\java\com\eddieowens\RNBoundaryModule.java
// import android.support.annotation.NonNull;
// import android.support.v4.app.ActivityCompat;
import androidx.annotation.NonNull;
import androidx.core.app.ActivityCompat;
@harshit-kishor2 work for me, but for every change in the node module dir ,its force to do the all procces again ...