-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not compatable for Android on NS CLI5+ #46
Comments
Same issue. I have problem with hook.
|
+1 |
The problem is in file hooks/after-prepare/nativescript-onesignal-gradle.js. This tries to modify the gradle files incorrectly. |
May I know what you modify? |
@karlix Thanks for letting us know. Sadly I'm no expert when it comes to SDKs etc.... can you please share with us how you fixed it? |
Hi @karlix it is realy working? Im trying to mess with it but having no luck. |
The steps I have taken to apply this manually are these: remove code contains in: in platforms\android\build.gradle add: there should be something like that:
in platforms\android\app\build.gradle add: apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin' add to the end of the file
in app\App_Resources\Android\app.gradle add/modify:
The only downside of this is that if you create the platform again you will restore the gradle files and you will have to re-apply the changes (this would be avoided with the hook that we deleted in the first step, since this does not modify the files in a way correct) |
@karlix thank you so much for posting this. As soon as I reclaim the push notifications ticket I will try this out. Thank you! |
@roblav96 Any update on this plugin correction yet? |
I Try all steps but know i getting error |
I think version 1.0.8 is broken. |
@kvindasAB How do I install that version? |
bofore uninstall current version and remote hooks/onesignal file
|
for me this plugin doesn't work |
I'm also experiencing difficulty in getting this plugin to run successfully. I did combine information/steps from the the Android SDK-- I also tried adding my app ID where I believed this should be placed based on the format in the npm instructions within main.ts as well as the specified location in app.gradle per the modification of deleting the hook and adding in code from Android SDK. The main complaints from my console:
I do comment out Here is my package.json:
I'm happy to provide any further information that is needed. |
After removing the iOS portion of the code, the only error that remains is the error: Is |
I fixed with this remove this file Add this to App_Resource/Android/app.gradle
Add this to App_Resource/Android/buildscript.gradle
rebuild. |
Thanks for that @oncul! I had to add one additional piece to
Without that, there were tons of errors about duplicate classes (i.e.):
|
Today, i got same issue. There is a pull request about gradle. Update your
code with that pr and remove platform. You will be succeed.
25 Eki 2019 Cum, saat 23:44 tarihinde Luke Sapan <[email protected]>
şunu yazdı:
… Thanks for that @oncul <https://github.com/oncul>! I had to add one
additional piece to App_Resource/Android/app.gradle:
android {
...
configurations {
all*.exclude module: 'play-services-base'
}
}
Without that, there were tons of errors about duplicate classes (i.e.):
java.lang.RuntimeException: Duplicate class com.google.android.gms.common.api.internal.zza found in modules classes.jar (com.google.android.gms:play-services-base:15.0.1) and classes.jar (com.google.android.gms:play-services-basement:16.0.1)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#46?email_source=notifications&email_token=AAC2Q3DJVZ2TLGVBWCNEYOLQQNLEDA5CNFSM4GL3SKL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECJQRIY#issuecomment-546506915>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC2Q3FGZREKG2BRIOUBMDLQQNLEDANCNFSM4GL3SKLQ>
.
|
I'm getting massive errors when trying to use this plugin on my Android app (iOS builds fine but users don't register with APNS) and would like to know if this can please be updated asap to cater for it.
The text was updated successfully, but these errors were encountered: