-
Notifications
You must be signed in to change notification settings - Fork 444
Android App Not working with NS 8.2. #1873
Comments
Same issue here with vanilla JS. |
For me the following line fixed the issue in the App_Resources/Android/app.gradle file:
https://firebase.google.com/docs/android/setup#manually_add_firebase |
Thanks @tujlaky I already have that apply plugin in my app.gradle file. This is driving me crazy. |
Sadly, this did not work for me. I am getting the same error mentioned above. |
I was able to fix my issue. The classpath |
I am also having the same issue. @SingleMalted could you please provide more info, example of .gradle file with it's location? |
I made the following changes and managed to build. I hope this gets fixed in the future
in platforms\android\build.gradle
|
@maddy2get basically what @comporell has posted above. Your I use an |
Thanks @SingleMalted and @comporell for the detailed explanation. |
I made the changes in platform/app/build.gradle and platform/build.gradle I receive the error `Gradle build... Execution failed for task ':app:processDebugGoogleServices'. Unable to apply changes on device: emulator-5554. Error is: Command ./gradlew failed with exit code 1.` Can anybody help me Thanks |
@pmiguelmartins Do you have the https://developers.google.com/android/guides/google-services-plugin |
@SingleMalted Thanks for the fast response Yes I have .... this was working ... |
The |
I create a new project and put the code where you mentioned I still have the error ` Execution failed for task ':app:processDebugGoogleServices'. |
Excuse me for asking again but you are downloading your |
@SingleMalted yes |
@pmiguelmartins do you have any hook scripts that might be overwriting the run |
my ns doctor : ` No issues were detected. node version : v16.14.1 I created a new app ( ns create example-app --vue ) and make the changes but the error keeps ... |
Oh didn't realize you are using vue, not that it should really matter but I'm using TS/Vanilla JS. |
@SingleMalted I've encountered this same problem but I'm confused by your description of the locations. I have a {N} 8.2 JS project, and I don't have (or can't find) a |
I create a new project make the changes and now the error is :
Execution failed for task ':app:processDebugMainManifest'. |
I'm sure your structure is different than mine since I'm building in vanilla js. I have hook scripts that write to a couple build.gradles. I would suggest jumping on the NS discord channel and asking someone who is currently using vue. |
@pmiguelmartins you're getting closer. Your android manifest needs an exported="true || false" for every activity. You also need to add your firebase services. Bare with me I'm on the beach on my phone 😆 I'll get you that code in a few min. |
@SingleMalted Thanks very much And enjoy the beach ... I'm from Portugal / Algarve ... I know what is beach time !!!! |
You need to add a service for every firebase component you're using... like so
|
Rather than adding classpath to platforms/android/build.gradle a better method is to create a file named App_Resources/Android/buildscript.gradle with the content below:
this way, the gms configuration will be included at the initialization of the build process. Make sure to clean the project and start over. |
As @SingleMalted mentioned, add exported = "true" flag to you activity in App_Resources\Android\src\main\AndroidManifest.xml
|
@comporell I added the
Any ideas? |
Do you have |
Yeah I do |
@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)
PS - Sorry for my English but I'm Portuguese |
@pmiguelmartins Thanks for helping out! Yes, I have |
Hi @comporell, I followed your steps and added the content in buildscript.gradle >. I get some new error: A problem occurred evaluating script. Seems the compile() function has been removed in gradle 7.0 and depracated before 4.10. Does anyone know how to specify the gradle version used? Or an idea for a fix for the problem above? |
Hello guys, I found the issue. https://gist.github.com/gabrielbiga/aa4efb87704bc5238efdaa5a9d06fa1d I will create a PR adding this modified hook to the code. Until then, please test it. |
@gabrielbiga After replacing firebase-build-gradle.js I am got below error:
|
I've tried everything described here but unfortunately nothing works. Urgent response and error correction is needed! |
Thank You so much. Works fine for me! |
Thanks, @SingleMalted. This worked for me. I also need an Thanks in advance. |
Hello, |
@EddyVerbruggen we have the same problem with NS6, do you have any suggestions? Thanks |
Solved for me. |
A problem occurred evaluating script.
Plugin with id 'com.google.gms.google-services' not found.
Actions taken to resolve:
Added
in both before-plugins and app gradle.
5. Add android platform executes without any problem
6. Build fails with problem
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.
The text was updated successfully, but these errors were encountered: