Sadly, the instructions for Android installation within a NativeScript app built using Angular don't work as the app structure is different when you create an Android app. For one thing, there's no app.gradle file in app/App_Resources/Android in this type of app. I try to build, but we get all kind of errors. could you take a look at the angular-firebase branch here: http://www.github.com/nativescript/sample-Groceries
thanks!
Just to note, the specific error I鈥檓 getting at this point is
W/GooglePlayServicesUtil( 2177): Cannot find Google Play services package name.
W/GooglePlayServicesUtil( 2177): android.content.pm.PackageManager$NameNotFoundException: com.google.android.gms
W/GooglePlayServicesUtil( 2177): at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:114)
D/FirebaseApp( 2177): Initialized class com.google.firebase.auth.FirebaseAuth.
W/GooglePlayServicesUtil( 2177): Google Play services is missing.
Which is confusing because I _think_ I have everything needed set up. We committed the appropriate native files to help debug this. See https://github.com/NativeScript/sample-Groceries/tree/angular-firebase/platforms/android.
I will take a deeper look tomorrow, but for now:
apply plugin: 'com.google.gms.google-services' to the very bottom of build.gradle, as described in the readme and here: https://developers.google.com/android/guides/google-services-plugin#introductionandroid in a Terminal window and make sure you have the latest Google Play Services and Repository bits.cd platforms/android and then ./gradlew :app:dependencies. That will produce an error but please paste the entire output here.hi, I did the above changes and ran the command:
:config phase: createDefaultIncludeFiles
+found plugins: nativescript-plugin-firebase
{
"F0" {
dimension "nativescriptpluginfirebase"
}
}
} +found plugins: tns-core-modules-widgets
{
"F1" {
dimension "tnscoremoduleswidgets"
}
} }
:config phase: createPluginsConfigFile
Creating product flavors include.gradle file in /Users/Looper/Documents/NativeScript/sample-Groceries/platforms/android/configurations folder...
:config phase: pluginExtend
+applying configuration from: /Users/Looper/Documents/NativeScript/sample-Groceries/platforms/android/configurations/include.gradle
+applying configuration from: /Users/Looper/Documents/NativeScript/sample-Groceries/platforms/android/configurations/nativescript-plugin-firebase/include.gradle
+applying configuration from: /Users/Looper/Documents/NativeScript/sample-Groceries/platforms/android/configurations/tns-core-modules-widgets/include.gradle
:config phase: copyAarDependencies
:config phase: addAarDependencies
+adding dependency: /Users/Looper/Documents/NativeScript/sample-Groceries/platforms/android/libs/aar/widgets-release.aar
FAILURE: Build failed with an exception.
BUILD FAILED
Total time: 9.878 secs
@jlooper Did you have the same error as @tjvantoll or did you see something like com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536?
I'm seeing that one and need to add MultiDex to fix that.
I will be looking more into this in a few hours.
I see different errors, as I did add MultiDex prior as per the instructions. Ain't Android great? I'll paste the errors in a bit after my commute...
OMG got it working!
PR sent.
JS: firebase.init done
JS: Page loaded
JS: BOOTSTRAPPING...
JS: Setting DOM
JS: Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ANGULAR BOOTSTRAP DONE.
JS: --- auth state changed: com.google.android.gms.internal.zzadg@5fccb6f
JS: --- user: null
JS: --- auth state changed: com.google.android.gms.internal.zzadg@5fccb6f
JS: --- user: com.google.android.gms.internal.zzadh@3e04dc12
JS: --- auth state changed: com.google.android.gms.internal.zzadg@5fccb6f
JS: --- user: com.google.android.gms.internal.zzadh@3e04dc12

also, to get Google Play services on your Android emulators so you can test, it's super fun: https://inthecheesefactory.com/blog/how-to-install-google-services-on-genymotion/en
Most helpful comment
OMG got it working!
PR sent.