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

[Android] Could not build lib from source #2296

Closed
fqborges opened this issue Jun 1, 2018 · 2 comments
Closed

[Android] Could not build lib from source #2296

fqborges opened this issue Jun 1, 2018 · 2 comments

Comments

@fqborges
Copy link
Contributor

fqborges commented Jun 1, 2018

How to reproduce:

git clone https://github.com/react-community/react-native-maps.git
cd react-native-maps
yarn install
yarn build:android

result:

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\git\react-native-maps\lib\android\build.gradle' line: 46

* What went wrong:
A problem occurred evaluating project ':react-native-maps-lib'.
> Could not find method compileOnly() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
@fqborges
Copy link
Contributor Author

fqborges commented Jun 1, 2018

This is related to this pull #2096 since it updated gradle files that are used when this lib is included on rn apps, but not the gradle files to build the lib itself.

@adhavalboy
Copy link

adhavalboy commented Jun 1, 2018

got to react-native-maps\lib\android\build.gradle'

and Replace compileOnly() with provided
and implementation as compile

  provided "com.facebook.react:react-native:+"
  compile "com.google.android.gms:play-services-base:$googlePlayServicesVersion"
  compile "com.google.android.gms:play-services-maps:$googlePlayServicesVersion"
  compile "com.google.maps.android:android-maps-utils:$androidMapsUtilsVersion"

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

3 participants