question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to build the project in android

See original GitHub issue
FAILURE: Build failed with an exception.  * Where: Build file 'C:\Users\User\Desktop\MyApp\ap-app-fb\platforms\android\build.gradle' line: 699  * What went wrong: A problem occurred evaluating root project 'wpapp'. 
> Failed to apply plugin [id 'com.google.gms.google-services']    
> For input string: "+"  * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.  BUILD FAILED  Total time: 20.566 secs Command C:\Users\User\Desktop\MyApp\ap-app-fb\platforms\android\gradlew.bat failed with exit code 1
'FAILURE:' is not recognized as an internal or external command,
operable program or batch file.
  • I have google-services.json in "platforms\android\ " path.
  • I have installed latest “Google Play Service”, “Google Repository” & “Android Support Repository” in Android SDK.
  • I have tried using :
     compile 'com.google.android.gms:play-services:9.0.0'

and

     compile 'com.google.android.gms:play-services:9.2.0'

then, I get issues like:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processF0F1F2F3F4F5F6F7DebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 9.2.0.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
burkardcommented, Dec 6, 2017

What solved for me was look which version the nativescript-plugin-firebase and set the same for the file app/App_Resources/Android/app.gradle

  1. Click here and then follow the “this version” link; there you’ll see something like this: def firebaseVersion = "11.4.2" 2)Now, open app/App_Resources/Android/app.gradle and put this inside defaultConfig: project.ext { googlePlayServicesVersion = "11.4.2" }

Hope that helps!

1reaction
EddyVerbruggencommented, Jul 31, 2016

What I’m reading all over the interwebs is that one should (unfortunately) avoid using + in the compile .. play-services command.

Armed with that bit of information I just verified this works with both plugins installed:

First remove/add the platform folder:

  • tns platform remove android
  • tns platform add android
  • Re-add the google-services.json and alter the build.gradle script (see this plugin’s readme)

Alter the Maps plugin to include the same version as the Firebase plugin:

  • Open node_modules/nativescript-google-maps-sdk/platforms/android/
  • Replace that + by 9.2.0

That should build nicely. If so I will alter the readme and refer to this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to build project in Android Studio - Stack Overflow
Looks like Android Studio uses another copy of SDK, which does not have Android Support repository installed. Please make sure it has all...
Read more >
Known issues with Android Studio and Android Gradle Plugin
To fix the issue for all future projects, click File > Close Project. You should see the welcome screen. Then click Configure >...
Read more >
Error during build run after modifying resource files (strings) or ...
I often see this error message when running a build after I modified resource files, AIDL, or other java files that depend on...
Read more >
Android Studio unable to build any projects in SDK...
Android Studio unable to build any projects in SDK/Build ... I have had to literally uninstall and re-install Android Studio 4 times today....
Read more >
Unable to build project in Android Studio · Issue #139 - GitHub
Copy all the new code you wrote (if you have) / any changes to a new file. Download/clone/setup this project again, fix any...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found