Open ZabelTech opened 9 years ago
I had the same problem. See here for my solution: https://github.com/akreienbring/GCMPushPlugin#android-install
Can someone please post specific directions on how to install this for android? I am trying to integrate it into an ionic app - the compilation process invokes 'cordova build' so adding to build.grade won't work as it overwrites it.
I added both @akreienbring's suggestion as well as tried the original suggestion by @gonzaloaune in my build-extras.grade but each time I get
Running: /Users/pp/winshare/pp/projects/phonegap/zmNinja/platforms/android/gradlew cdvBuildDebug -b /Users/pp/winshare/pp/projects/phonegap/zmNinja/platforms/android/build.gradle -Dorg.gradle.daemon=true
embedded
FAILURE: Build failed with an exception.
* Where:
Script '/Users/pp/winshare/pp/projects/phonegap/zmNinja/platforms/android/cordova-plugin-gcmpushplugin/zmninja-build-extras.gradle' line: 1
* What went wrong:
A problem occurred evaluating script.
> Failed to apply plugin [id 'com.google.gms.google-services']
> Plugin with id 'com.google.gms.google-services' not found.
If someone can please post complete build-extra.gradle files and where they need to go I'd much appreciate it.
The iOS version works fine.
Again, see here https://github.com/akreienbring/GCMPushPlugin#android-install for my findings regarding the gradle files. I ended up not using the build-extra.gradle files as I was not able to figure out how these files are merged into the original build configuration file.
@akreienbring yes I read that - unfortunately, I don't (yet) have knowledge of how to do a build without doing cordova build. Can you share how you compile it?
I'm using Android Studio and the included (gradle) build functionality.
@pliablepixels could you make it run on iOS? with which versions you've tried?
No, i'm not developing for IOS.
@comiguel yes, I had no problem with iOS. I am on iOS9 and Xcode 7. If you are facing compilation problems, I had to do the following:
a) Disable bitcode compilation in Xcode
b) Enable external module support
c) Add $(inherited)
without "-" at the top of OTHER_LINKER_FLAGS (I forgot the exact name)
However, I've now changed path. I've switched to using the open source air notifier (set up a server at home) and am using that now to push instead of GCM for iOS.
Hi, i tried your plugin, but i cannot find the directory to put google-services.json in. I think it must be under platforms/android but its not there, any advice? thanks