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

Error while building anrdoid app #89

Open
SanchitSahu opened this issue Oct 16, 2017 · 11 comments
Open

Error while building anrdoid app #89

SanchitSahu opened this issue Oct 16, 2017 · 11 comments

Comments

@SanchitSahu
Copy link

SanchitSahu commented Oct 16, 2017

Your Environment

  • Plugin version: Latest
  • Platform: Android
  • Nativescript version (tns info):
    All NativeScript components versions information
┌──────────────────┬─────────────────┬────────────────┬──────────────────┐
│ Component        │ Current version │ Latest version │ Information      │
│ nativescript     │ 3.1.3           │ 3.2.1          │ Update available │
│ tns-core-modules │ 3.2.0           │ 3.2.0          │ Up to date       │
│ tns-android      │ 3.2.0           │ 3.2.0          │ Up to date       │
│ tns-ios          │ 3.2.0           │ 3.2.0          │ Up to date       │
└──────────────────┴─────────────────┴────────────────┴──────────────────┘

Expected Behavior

Android should build with the plugin installed

Actual Behavior

Build fails with error, attached the logs

Steps to Reproduce

tns run android

Context

Run my app

Debug logs

tns android.txt

@christocracy
Copy link
Member

You have multiple plugins requesting different version of play-services dependency. This plugin requests 11.+.

Found com.google.android.gms:play-services-location:11.+, but version 10.0.+ is needed for the google-services plugin.

Most likely colliding with some sort of push plugin. What are your other plugins installed?

@SanchitSahu
Copy link
Author

Here is the list of plugins:

Successfully prepared plugin nativescript-angular for android.
Successfully prepared plugin nativescript-background-geolocation-lt for android.
Successfully prepared plugin nativescript-bottombar for android.
Successfully prepared plugin nativescript-branch-io-sdk for android.
Successfully prepared plugin nativescript-carousel for android.
Successfully prepared plugin nativescript-contacts for android.
Successfully prepared plugin nativescript-email for android.
Successfully prepared plugin nativescript-facebook-login for android.
Successfully prepared plugin nativescript-geolocation for android.
Successfully prepared plugin nativescript-google-analytics for android.
Successfully prepared plugin nativescript-google-maps-sdk for android.
Successfully prepared plugin nativescript-google-places for android.
Successfully prepared plugin nativescript-gradient for android.
Successfully prepared plugin nativescript-loading-indicator for android.
Successfully prepared plugin nativescript-orientation for android.
Successfully prepared plugin nativescript-plugin-firebase for android.
Successfully prepared plugin nativescript-ratings for android.
Successfully prepared plugin nativescript-screen-orientation for android.
Successfully prepared plugin nativescript-social-share for android.
Successfully prepared plugin nativescript-socket.io for android.
Successfully prepared plugin nativescript-swiss-army-knife for android.
Successfully prepared plugin nativescript-telerik-ui-pro for android.
Successfully prepared plugin tns-core-modules for android.
Successfully prepared plugin nativescript-intl for android.
nativescript-background-fetch is not supported for android.
Successfully prepared plugin nativescript-background-fetch for android.
Successfully prepared plugin nativescript-permissions for android.
Successfully prepared plugin nativescript-dom for android.
Successfully prepared plugin nativescript-globalevents for android.
Successfully prepared plugin tns-core-modules-widgets for android.

@christocracy
Copy link
Member

Most likely colliding with nativescript-plugin-firebase

@SanchitSahu
Copy link
Author

How do I fix that? any reference link?

@christocracy
Copy link
Member

Try this. I will install this plugin and reproduce the conflict and explore the best way around it.

These conflicts are very common, since many plugins use play-services.

@simonettoa
Copy link

@SanchitSahu did you resolve the issue? I'm facing the same issue; I'm using the nativescript-plugin-firebase and that is the conflict.

@Emmandez
Copy link

I'm not using nativescript-plugin-firebase but i have the same error when building the application. Has anyone found a way to solve it?

@christocracy
Copy link
Member

@Emmandez What plugins are you using?

@Emmandez
Copy link

Emmandez commented Jun 11, 2018

These are the plugins i'm using.

Successfully prepared plugin nativescript-camera for android. Successfully prepared plugin nativescript-carousel for android. Successfully prepared plugin nativescript-fancyalert for android. Successfully prepared plugin nativescript-google-analytics for android. Successfully prepared plugin nativescript-grid-view for android. Successfully prepared plugin nativescript-image-zoom for android. Successfully prepared plugin nativescript-imagepicker for android. Successfully prepared plugin nativescript-iqkeyboardmanager for android. Successfully prepared plugin nativescript-local-notifications for android. Successfully prepared plugin nativescript-localstorage for android. Successfully prepared plugin nativescript-masked-text-field for android. Successfully prepared plugin nativescript-permissions for android. Successfully prepared plugin nativescript-phone for android. Successfully prepared plugin nativescript-pulltorefresh for android. Successfully prepared plugin nativescript-purchase for android. Successfully prepared plugin nativescript-push-notifications for android. Successfully prepared plugin nativescript-social-share for android. Successfully prepared plugin nativescript-theme-core for android. Successfully prepared plugin nativescript-ui-listview for android. Successfully prepared plugin nativescript-webview-interface for android. Successfully prepared plugin tns-core-modules for android. Successfully prepared plugin nativescript-pro-ui for android. Successfully prepared plugin nativescript-ui-core for android. Successfully prepared plugin tns-core-modules-widgets for android.

Then I got this error
Unable to apply changes on device: ZY222W2F3Q. Error is: Failed to build plugin nativescript-google-analytics : Error: Command failed: gradlew.bat -p MyPATH\platforms\tempPlugin\nativescript_google_analytics assembleRelease -PcompileSdk=android-27 -PbuildToolsVersion=27.0.3 -PsupportVersion=26.0.0-alpha1

And this:

* What went wrong:
Could not resolve all files for configuration ':releaseCompileClasspath'.
> Could not find support-v4.aar (com.android.support:support-v4:26.1.0).
  Searched in the following locations:
      https://jcenter.bintray.com/com/android/support/support-v4/26.1.0/support-v4-26.1.0.aar

@christocracy
Copy link
Member

Did you Set the Google Play Services Version? A number of plugins (including this one) are aware of this variable and will align their play-services version to it.

@christocracy
Copy link
Member

Execute the following command. Paste the following dependency tree (not the whole output, just the FIRST dependency tree in the output)

$ cd platforms/android
$ ./gradlew app:dependencies

compile - Compile dependencies for 'main' sources (deprecated: use 'implementation' instead).
+--- com.google.android.gms:play-services-location:11.8.0
|    +--- com.google.android.gms:play-services-base:11.8.0
|    |    +--- com.google.android.gms:play-services-basement:11.8.0
|    |    |    +--- com.android.support:support-v4:25.2.0 -> 26.1.0
|    |    |    |    +--- com.android.support:support-compat:26.1.0
|    |    |    |    |    +--- com.android.support:support-annotations:26.1.0
|    |    |    |    |    \--- android.arch.lifecycle:runtime:1.0.0
|    |    |    |    |         +--- android.arch.lifecycle:common:1.0.0
|    |    |    |    |         \--- android.arch.core:common:1.0.0
|    |    |    |    +--- com.android.support:support-media-compat:26.1.0
|    |    |    |    |    +--- com.android.support:support-annotations:26.1.0
|    |    |    |    |    \--- com.android.support:support-compat:26.1.0 (*)
|    |    |    |    +--- com.android.support:support-core-utils:26.1.0
|    |    |    |    |    +--- com.android.support:support-annotations:26.1.0
|    |    |    |    |    \--- com.android.support:support-compat:26.1.0 (*)
|    |    |    |    +--- com.android.support:support-core-ui:26.1.0
|    |    |    |    |    +--- com.android.support:support-annotations:26.1.0
|    |    |    |    |    \--- com.android.support:support-compat:26.1.0 (*)
|    |    |    |    \--- com.android.support:support-fragment:26.1.0
|    |    |    |         +--- com.android.support:support-compat:26.1.0 (*)
|    |    |    |         +--- com.android.support:support-core-ui:26.1.0 (*)
|    |    |    |         \--- com.android.support:support-core-utils:26.1.0 (*)
|    |    |    \--- com.google.android.gms:play-services-basement-license:11.8.0
|    |    +--- com.google.android.gms:play-services-tasks:11.8.0
|    |    |    +--- com.google.android.gms:play-services-basement:11.8.0 (*)
|    |    |    \--- com.google.android.gms:play-services-tasks-license:11.8.0
|    |    \--- com.google.android.gms:play-services-base-license:11.8.0
|    +--- com.google.android.gms:play-services-basement:11.8.0 (*)
|    +--- com.google.android.gms:play-services-tasks:11.8.0 (*)
|    \--- com.google.android.gms:play-services-location-license:11.8.0
+--- com.android.support:appcompat-v7:26.1.0
|    +--- com.android.support:support-annotations:26.1.0
|    +--- com.android.support:support-v4:26.1.0 (*)
|    +--- com.android.support:support-vector-drawable:26.1.0
|    |    +--- com.android.support:support-annotations:26.1.0
|    |    \--- com.android.support:support-compat:26.1.0 (*)
|    \--- com.android.support:animated-vector-drawable:26.1.0
|         +--- com.android.support:support-vector-drawable:26.1.0 (*)
|         \--- com.android.support:support-core-ui:26.1.0 (*)
+--- com.squareup.okhttp3:okhttp:3.10.0
|    \--- com.squareup.okio:okio:1.14.0
+--- org.greenrobot:eventbus:3.0.0
+--- org.slf4j:slf4j-api:1.7.21
+--- com.github.tony19:logback-android:1.1.1-9
|    \--- com.github.tony19:apktool-lib:1.4.4-5
\--- com.intentfilter:android-permissions:0.1.6

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