Agontuk / react-native-geolocation-service

React native geolocation service for iOS and android
https://www.npmjs.com/package/react-native-geolocation-service
MIT License
1.61k stars 291 forks source link

Build Failed after add this package #339

Open Lucas0liveir opened 2 years ago

Lucas0liveir commented 2 years ago

Environment

System: OS: Windows 10 10.0.19044 CPU: (16) x64 Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz Memory: 1.26 GB / 15.92 GB Binaries: Node: 14.17.4 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD npm: 6.14.14 - C:\Program Files\nodejs\npm.CMD Watchman: 20220320.140531.0 - C:\ProgramData\chocolatey\bin\watchman.EXE SDKs: Android SDK: API Levels: 29, 30, 31 Build Tools: 29.0.2, 30.0.2, 30.0.3 System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom Android NDK: Not Found Windows SDK: Not Found IDEs: Android Studio: Version 4.2.0.0 AI-202.7660.26.42.7351085 Visual Studio: Not Found Languages: Java: 1.8.0_292 - C:\Program Files\OpenJDK\openjdk-8u292-b10\bin\javac.EXE npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.67.1 => 0.67.1 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found

Platforms

Is this issue related to Android, iOS, or both ?

Versions

Please add the used versions/branches

Description

After installing the library the project does not compile, the build failure happens in the library task:

Task :react-native-async-storage_async-storage:compileReleaseJavaWithJavac FAILED C:\Users\Lucas\Desktop\folderName\projectname\node_modules\@react-native-async-storage\async-storage\android\src\main\java\com\reactnativecommunity\asyncstorage\AsyncStorageExpoMigration.java:7: error: package android.support.annotation does not exist import android.support.annotation.RequiresApi; ^ C:\Users\Lucas\Desktop\folderName\projectname\node_modules\@react-native-async-storage\async-storage\android\src\main\java\com\reactnativecommunity\asyncstorage\AsyncStorageExpoMigration.java:126: error: cannot find symbol @RequiresApi(Build.VERSION_CODES.O) ^ symbol: class RequiresApi location: class com.reactnativecommunity.asyncstorage.AsyncStorageExpoMigration Note: C:\Users\Lucas\Desktop\folderName\projectname\node_modules\@react-native-async-storage\async-storage\android\src\main\java\com\reactnativecommunity\asyncstorage\AsyncStorageModule.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\Users\Lucas\Desktop\folderName\projectname\node_modules\@react-native-async-storage\async-storage\android\src\main\java\com\reactnativecommunity\asyncstorage\AsyncStoragePackage.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 2 errors

FAILURE: Build failed with an exception.

Just remove the react-native-geolocation-service its works! I need this lib, help.

Agontuk commented 2 years ago

C:\Users\Lucas\Desktop\folderName\projectname\node_modules@react-native-async-storage\async-storage\android\src\main\java\com\reactnativecommunity\asyncstorage\AsyncStorageExpoMigration.java:7: error: package android.support.annotation does not exist

You're getting error from another library, not this one.