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.

Android App Not working with NS 8.2.

See original GitHub issue

A problem occurred evaluating script. Plugin with id ‘com.google.gms.google-services’ not found.

Actions taken to resolve:

  1. Created a Native-script Vue project of NS 8.2.1
  2. After creating run the app in android emulator. It works fine.
  3. Added npm module @nativescript/firebase and its related google-services.json in App_resources/Android folder. Also bundle id’s are same for the firebase json and application.xml

Added

project.ext {
  googlePlayServicesVersion = "+"}

in both before-plugins and app gradle. 5. Add android platform executes without any problem 6. Build fails with problem

 A problem occurred evaluating script.
Plugin with id 'com.google.gms.google-services' not found.

PS: Same code works for iOS.

My Local environment Information ✔ Getting environment information

No issues were detected. ✔ Your ANDROID_HOME environment variable is set and points to correct directory. ✔ Your adb from the Android SDK is correctly installed. ✔ The Android SDK is installed. ✔ A compatible Android SDK for compilation is found. ✔ Javac is installed and is configured properly. ✔ The Java Development Kit (JDK) is installed and is configured properly. ✔ Xcode is installed and is configured properly. ✔ xcodeproj is installed and is configured properly. ✔ CocoaPods are installed. ✔ CocoaPods update is not required. ✔ CocoaPods are configured properly. ✔ Your current CocoaPods version is newer than 1.0.0. ✔ Python installed and configured correctly. ✔ The Python ‘six’ package is found. ✔ Xcode version 12.5.1 satisfies minimum required version 10. ✔ Getting NativeScript components versions information… ⚠ Update available for component nativescript. Your current version is 8.2.1 and the latest available version is 8.2.2. ✔ Component @nativescript/core has 8.2.1 version and is up to date. ✖ Component @nativescript/ios is not installed. ✔ Component @nativescript/android has 8.2.2 version and is up to date.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:42

github_iconTop GitHub Comments

5reactions
SingleMaltedcommented, Mar 14, 2022

@maddy2get basically what @comporell has posted above.

Your platform/app/build.gradle needs to have apply plugin: "com.google.gms.google-services" and your platform/build.gradle needs to contain dependencies { classpath "com.google.gms:google-services:4.3.4"}

I use an after-prepare hook script to write these two lines to their respective files. This is necessary for me as I use CI/CD for my builds. If you don’t use a CI/CD you can manually update the build files with the lines above. `

3reactions
pmiguelmartinscommented, Mar 18, 2022

@tylerablake Hi I had the same problem

You have to had this in Manifest (I think its because the script when insert this code in the Manifest does’t put the exported)

<service android:name="org.nativescript.plugins.firebase.MyFirebaseInstanceIDService" android:exported="false"> <intent-filter> <action android:name="com.google.firebase.INSTANCE_ID_EVENT" /> </intent-filter> </service> <service android:name="org.nativescript.plugins.firebase.MyFirebaseMessagingService" android:exported="false"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT" /> </intent-filter> </service>

PS - Sorry for my English but I’m Portuguese

Read more comments on GitHub >

github_iconTop Results From Across the Web

NS 8.2 Android crash when using http-Module inside worker
Start the app and tap the Button on Android to start the worker script that is doing an http request, then the app...
Read more >
firebase.init() keeps crashing on new NativeScript 8.2.3 App
I keep getting Error: Cannot read property 'initializeApp' of undefined. It seems "firebase()" is undefined. I saw at least one person have the ......
Read more >
NativeScript 8.2 Released
NativeScript 8.2 brings some new features, broad memory optimizations throughout core and runtimes, some bug fixes, as well as support for ...
Read more >
Fix an installed Android app that isn't working - Google Support
Step 1: Restart & update · Open your phone's Settings app. · Near the bottom, tap System and then Advanced and then System...
Read more >
MABS 8 Release notes - Support - OutSystems documentation
If this error occurs to you, it means that you have a non-supported plugin with a breaking change. To fix the issue, set...
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