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

FAILURE: Build completed with 2 failures. after installation of module #563

Open
EmanueleAgo opened this issue Feb 24, 2022 · 3 comments
Open

Comments

@EmanueleAgo
Copy link

Your Environment

  • Plugin version: 0.6.3
  • Platform: iOS or Android
  • OS version: 10
  • Device manufacturer and model: Samsung
  • Running in Simulator:
  • React Native version: 0.66.3
  • Plugin configuration options:
  • Link to your project:

Context

I want to install the module but I have 2 error when I run android after installation.

Expected Behavior

Actual Behavior

Possible Fix

Steps to Reproduce

  1. yarn add @mauron85/react-native-background-geolocation
  2. node ./node_modules/@mauron85/react-native-background-geolocation/scripts/postlink.js
  3. add googlePlayServicesVersion = "17.6.0" in ext of android/build.gradle
  4. npm run android

Context

I tryed the manual setup but there are some errors similar to this.

Debug logs

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Script 'C:\Users\emanu\App\DetectApp-copia11\node_modules\@mauron85\react-native-background-geolocation\android\common\VERSIONS.gradle' line: 27

* What went wrong:
A problem occurred evaluating project ':@mauron85_react-native-background-geolocation-common'.
> Could not get unknown property 'android' for project ':app' of type org.gradle.api.Project.

* 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:
A problem occurred configuring project ':@mauron85_react-native-background-geolocation-common'.
> com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle

* 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 10s
@zero2603
Copy link

Same issue

@DanDance
Copy link

#500 (comment)

@enriqueFcoG
Copy link

add this to your android/settings.gradle

include ':@mauron85_react-native-background-geolocation-common'
project(':@mauron85_react-native-background-geolocation-common').projectDir = new File(rootProject.projectDir, '../node_modules/@mauron85/react-native-background-geolocation/android/common')
include ':@mauron85_react-native-background-geolocation'
project(':@mauron85_react-native-background-geolocation').projectDir = new File(rootProject.projectDir, '../node_modules/@mauron85/react-native-background-geolocation/android/lib')

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

4 participants