question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TaskExecutionException: Execution failed for task ':react-native-geolocation-service:compileReleaseJavaWithJavac'

See original GitHub issue

Hello,

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:closed
  • Created 4 years ago
  • Reactions:13
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

23reactions
Agontukcommented, Oct 2, 2019

Running npx jetify should solve this issue.

7reactions
tevin-maxwellcommented, Sep 20, 2019

@Chepkeitany I got the same issue. After some googling, this work for me: https://github.com/react-native-community/react-native-geolocation/issues/39

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found