TaskExecutionException: Execution failed for task ':react-native-geolocation-service:compileReleaseJavaWithJavac'
See original GitHub issueHello,
I am getting a release compilation error after upgrade to latest version of react-native-geolocation-service and react-native to RN0.60.5.
Below is part of the stacktrace
> Task :react-native-geolocation-service:compileReleaseJavaWithJavac FAILED
/Users/chepkeitany/PayGo/hub-agent-app/node_modules/react-native-geolocation-service/android/src/main/java/com/agontuk/RNFusedLocation/LocationUtils.java:10: error: cannot find symbol
import android.support.v4.app.ActivityCompat;
^
symbol: class ActivityCompat
location: package android.support.v4.app
/Users/chepkeitany/PayGo/hub-agent-app/node_modules/react-native-geolocation-service/android/src/main/java/com/agontuk/RNFusedLocation/LocationUtils.java:23: error: cannot find symbol
return ActivityCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED ||
^
symbol: variable ActivityCompat
location: class LocationUtils
/Users/chepkeitany/PayGo/hub-agent-app/node_modules/react-native-geolocation-service/android/src/main/java/com/agontuk/RNFusedLocation/LocationUtils.java:24: error: cannot find symbol
ActivityCompat.checkSelfPermission(context, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED;
^
symbol: variable ActivityCompat
location: class LocationUtils
Note: /Users/chepkeitany/PayGo/hub-agent-app/node_modules/react-native-geolocation-service/android/src/main/java/com/agontuk/RNFusedLocation/LocationUtils.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
3 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-geolocation-service:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:13
- Comments:7 (3 by maintainers)
Top Results From Across the Web
org.gradle.api.tasks.TaskExecutionException: Execution failed ...
This will most Error:assuredly not work. At a minimum, it jeopardizes the Error:compatibility of your app with future versions of the platform. Error:It...
Read more >org.gradle.api.tasks.TaskExecutionException: Execution failed ...
When react-native run-android, I encountered this issue. Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':react-native- ...
Read more >org.gradle.api.tasks.TaskExecutionException: Execution failed ...
Android : org.gradle.api.tasks. TaskExecutionException : Execution failed for task ':app:transformClassesWithDexForDebug' [ Beautify Your ...
Read more >Strange Gradle task behavior : IDEA-235411
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compileJava'. at org.gradle.api.internal.tasks.execution.
Read more >Lint failure when upgrading to 3.6.x [150506104] - Issue Tracker
TaskExecutionException : Execution failed for task ':app:lintDebug'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Running
npx jetify
should solve this issue.@Chepkeitany I got the same issue. After some googling, this work for me: https://github.com/react-native-community/react-native-geolocation/issues/39