Skip to content
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

Problem on add pluggin for android plataform #1561

Closed
mariomarquesinf opened this issue Mar 28, 2018 · 17 comments
Closed

Problem on add pluggin for android plataform #1561

mariomarquesinf opened this issue Mar 28, 2018 · 17 comments

Comments

@mariomarquesinf
Copy link

WARNING: IF YOU IGNORE THIS TEMPLATE, WE'LL IGNORE YOUR ISSUE. YOU MUST FILL THIS IN!

Provide a general summary of the issue.

Your Environment

  • Plugin version: latest
  • Platform: ionic
  • OS version: Windows 10 Home 64bits
  • Device manufacturer / model:
  • Cordova version (cordova -v): 7.0.1
  • Cordova platform version (cordova platform ls):6.2.3
  • Plugin config
  • Ionic Version (if using Ionic): 3.20.0

Actual Behavior

Installing "cordova-plugin-local-notification" for android

Plugin doesn't support this project's android-sdk version. android-sdk: 23.0.0, failed version requirement: >=26

Skipping 'cordova-plugin-local-notification' for android

@rwillett
Copy link
Collaborator

So what's the problem? What are you expecting to see?

@mariomarquesinf
Copy link
Author

I don't know why this particular pluggin fails to install on android. That's my problem.

@AhmedHamedTN
Copy link

Any updates on this ? Same issue here

@rwillett
Copy link
Collaborator

@mariomarquesinf Android SDK level is wrong, install the right version

@SaiVikas0801 Don't pollute other threads. Your issue is nothing to do with this thread. Your issue is that the plugin only works on IOS 10. As the error message says IOS version requirement >= 10.0.0. Use the older plugin or upgrade IOS to 10.

@mariomarquesinf
Copy link
Author

@rwillett I have the Android SDK requested but i have the same error. Thanks for your response.

@xudongcamsys
Copy link

@mariomarquesinf any luck?
I have installed all sdk versions in Android Studio.

@Tawpie
Copy link

Tawpie commented May 18, 2018

I have no idea if it matters, but what versions of node and npm are you using?

node --version
npm --version

Nevermind. I have another system that will install the plugin and it's on the same node and npm versions (8.11.1 and 6.0.0) so this isn't it.

Trying to track this down as well, my android sdk is 27 according to android studio. The plugin wants android-sdk >= 26 so in theory the dependency is met. But in practice...

@rwillett
Copy link
Collaborator

We have the same versions and it all works.

I'd post a picture of your android studio and show whats installed.

@xudongcamsys
Copy link

Not sure if this is exactly related. but I updated Cordova Android to 7.1.0. and re-installed the plugin via Ionic. At least for now, it does schedule the notification on my testing Nexus 5 phone.

@Tawpie
Copy link

Tawpie commented May 21, 2018

Thx... It'll install (complaining about the sdk version) but I'm not able to get the build to happen (still, the error messages imply that I'm not building with the correct android sdk, and the correct sdk is installed). That's a topic for another issue however and I won't hijack this thread.

@madhavansu
Copy link

Same issue here, any solution to fix this.

@nagthgr8
Copy link

nagthgr8 commented Oct 31, 2018

Its been six months since this thread is open & not fixed yet ? or rather not answered

@nagthgr8
Copy link

nagthgr8 commented Oct 31, 2018

I have no idea if it matters, but what versions of node and npm are you using?

node --version
npm --version

Nevermind. I have another system that will install the plugin and it's on the same node and npm versions (8.11.1 and 6.0.0) so this isn't it.

Trying to track this down as well, my android sdk is 27 according to android studio. The plugin wants android-sdk >= 26 so in theory the dependency is met. But in practice...

I guess its not the same sdk versions in my case has 2 sdk folders which ANDROID_HOME variable not pointing to the same as Android SDK Manager without thinking of consequences I am trashing the old one now to see what happens next

@nagthgr8
Copy link

I kept this thread open in my shell that I come back & answer to this post pending since 6 months. This is what I did to fix the issue. In my case some how there are 2 versions of android sdk folders and the ANDROID_HOME is pointing to old version. First I uninstalled from Android Studio all the SDK which was installed, then I deleted these 2 sdk folders from C:\Users<UserName>\Local\AppData\Android
Then from Android Studio -> Tools -> SDK Manager I installed Android 8.1.1 which is having API 27
Then executed below

cordova platform rm android
cordova platform add android
that s it, it did gave some warnings but this time able to install local notification without any issue.
please also install Android Build Tools

@ghost
Copy link

ghost commented Apr 25, 2019

I get this error today,
I'm not sure if this helps but I removed the Android Q Preview and it worked for me.

@dpa99c
Copy link
Contributor

dpa99c commented May 23, 2019

I hit this error today - seems to be caused the this line in the plugin.xml:

<engine name="android-sdk"     version=">=26" />

Quick and dirty workaround: edit plugins/cordova-plugin-local-notifications/plugin.xml and comment out that line:

<!--<engine name="android-sdk"     version=">=26" />-->

Then force install the plugin again:

cordova plugin add cordova-plugin-local-notifications --force

@MInesGomes
Copy link

Thanks @dpa99c !
I was having

Failed to install 'cordova-plugin-local-notification': TypeError: Invalid Version: android-Q

I removed the Android Q Preview and it worked for me too :-)

katzer pushed a commit that referenced this issue Oct 7, 2019
…1772)

* Add namespace to provider authority to prevent crashes on Android.
See #1664

* Comment out android-sdk requirement since it's not being applied correctly.
See #1561

* oreo bug fix, no smallIcon set in notification (#1792)

* Update AssetUtil.java

Removing Resources.getSystem() to get resource ID because in android 8.1 (physical device) it fire an exception with the DEFALUT_ICON (res://icon) if no smallIcon is set in the notification schedule.
Changed also Options.java for small icon fallback

* Update Options.java

Removed resId = context.getApplicationInfo().icon
The application icon is set always and it is not able to select the resId = android.R.drawable.ic_popup_reminder. This is always set (API 1) and not showing ugly as app icon (notification small icon should be a silhouette)
ctayl pushed a commit to ctayl/cordova-plugin-local-notifications that referenced this issue Jul 21, 2022
…atzer#1772)

* Add namespace to provider authority to prevent crashes on Android.
See katzer#1664

* Comment out android-sdk requirement since it's not being applied correctly.
See katzer#1561

* oreo bug fix, no smallIcon set in notification (katzer#1792)

* Update AssetUtil.java

Removing Resources.getSystem() to get resource ID because in android 8.1 (physical device) it fire an exception with the DEFALUT_ICON (res://icon) if no smallIcon is set in the notification schedule.
Changed also Options.java for small icon fallback

* Update Options.java

Removed resId = context.getApplicationInfo().icon
The application icon is set always and it is not able to select the resId = android.R.drawable.ic_popup_reminder. This is always set (API 1) and not showing ugly as app icon (notification small icon should be a silhouette)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants