Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot find symbol import com.google.android.gms.common.api.ApiException; #42

Open
shariqahmed525 opened this issue Apr 14, 2020 · 0 comments

Comments

@shariqahmed525
Copy link

Hi,

I'm using RN version 0.62.1 and the module version is 1.2.1
Issue : When I start my server getting these errors

> Task :react-native-android-location-enabler:compileDebugJavaWithJavac FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings
46 actionable tasks: 44 executed, 2 up-to-date
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
/Users/mac/Desktop/Hams/BackgroundJobTracking/node_modules/react-native-android-location-enabler/android/src/main/java/
com/heanoria/library/reactnative/locationenabler/RNAndroidLocationEnablerModule.java:18: error: cannot find symbol
import com.google.android.gms.common.api.ApiException;
^
symbol: class ApiException
location: package com.google.android.gms.common.api
/Users/mac/Desktop/Hams/BackgroundJobTracking/node_modules/react-native-android-location-enabler/android/src/main/java/com/heanoria/library/reactnative/locationenabler/RNAndroidLocationEnablerModule.java:19: error: cannot find symbol
import com.google.android.gms.common.api.ResolvableApiException;
^
symbol: class ResolvableApiException
location: package com.google.android.gms.common.api
/Users/mac/Desktop/Hams/BackgroundJobTracking/node_modules/react-native-android-location-enabler/android/src/main/java/com/heanoria/library/reactnative/locationenabler/RNAndroidLocationEnablerModule.java:23: error: cannot find symbol
import com.google.android.gms.location.LocationSettingsResponse;
^
symbol: class LocationSettingsResponse
location: package com.google.android.gms.location
/Users/mac/Desktop/Hams/BackgroundJobTracking/node_modules/react-native-android-location-enabler/android/src/main/java/com/heanoria/library/reactnative/locationenabler/RNAndroidLocationEnablerModule.java:37: error: cannot find symbol
public class RNAndroidLocationEnablerModule extends ReactContextBaseJavaModule implements ActivityEventListener, OnCompleteListener {
^
symbol: class LocationSettingsResponse
/Users/mac/Desktop/Hams/BackgroundJobTracking/node_modules/react-native-android-location-enabler/android/src/main/java/com/heanoria/library/reactnative/locationenabler/RNAndroidLocationEnablerModule.java:110: error: cannot find symbol
public void onComplete(@nonnull Task task) {
^
symbol: class LocationSettingsResponse
location: class RNAndroidLocationEnablerModule
/Users/mac/Desktop/Hams/BackgroundJobTracking/node_modules/react-native-android-location-enabler/android/src/main/java/com/heanoria/library/reactnative/locationenabler/RNAndroidLocationEnablerModule.java:73: error: cannot find symbol
Task task = LocationServices.getSettingsClient(getCurrentActivity()).checkLocationSettings(builder.build());
^
symbol: class LocationSettingsResponse
location: class RNAndroidLocationEnablerModule
/Users/mac/Desktop/Hams/BackgroundJobTracking/node_modules/react-native-android-location-enabler/android/src/main/java/com/heanoria/library/reactnative/locationenabler/RNAndroidLocationEnablerModule.java:73: error: cannot find symbol
Task task = LocationServices.getSettingsClient(getCurrentActivity()).checkLocationSettings(builder.build());
^
symbol: method getSettingsClient(Activity)
location: class LocationServices
/Users/mac/Desktop/Hams/BackgroundJobTracking/node_modules/react-native-android-location-enabler/android/src/main/java/com/heanoria/library/reactnative/locationenabler/RNAndroidLocationEnablerModule.java:112: error: cannot find symbol
task.getResult(ApiException.class);
^
symbol: class ApiException
location: class RNAndroidLocationEnablerModule
/Users/mac/Desktop/Hams/BackgroundJobTracking/node_modules/react-native-android-location-enabler/android/src/main/java/com/heanoria/library/reactnative/locationenabler/RNAndroidLocationEnablerModule.java:115: error: cannot find symbol
} catch (ApiException exception) {
^
symbol: class ApiException
location: class RNAndroidLocationEnablerModule
/Users/mac/Desktop/Hams/BackgroundJobTracking/node_modules/react-native-android-location-enabler/android/src/main/java/com/heanoria/library/reactnative/locationenabler/RNAndroidLocationEnablerModule.java:119: error: cannot find symbol
ResolvableApiException resolvable = (ResolvableApiException) exception;
^
symbol: class ResolvableApiException
location: class RNAndroidLocationEnablerModule
/Users/mac/Desktop/Hams/BackgroundJobTracking/node_modules/react-native-android-location-enabler/android/src/main/java/com/heanoria/library/reactnative/locationenabler/RNAndroidLocationEnablerModule.java:119: error: cannot find symbol
ResolvableApiException resolvable = (ResolvableApiException) exception;
^
symbol: class ResolvableApiException
location: class RNAndroidLocationEnablerModule
11 errors

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-android-location-enabler: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.

  • Get more help at https://help.gradle.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant