-
Notifications
You must be signed in to change notification settings - Fork 197
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
Error 'Plugin-Version' of 'unspecified' for 'com.android.build.gradle.LibraryPlugin #709
Comments
I'm also getting a similar error with Cordova.
I'm using the following version of SDK
Steps to Reproduce Issue:
This error occurs only while building apps. But there is no issue while running the app with |
I'm suddenly getting the same error when building android for production. Ionic Info:
SDK version: The errors I'm getting:
For me it's pointing me towards the |
I had this issue (plus several others), and the solution was to upgrade to cordova-android 9.1.0 ie. I also had to add in the |
I had this problem myself with Perhaps the maintainers could chime in on this one as it's keeping me from upgrading to v3. |
Here is my plugin list if that helps:
and my dev env info:
|
can confirm that happens also on latest ionic with cordova android@8 . Unfortunately can't upgrade to @9 |
@jkasten2 could you have a look? |
@gelinger777 you should be fine to build the latest cordova android if you downgrade to 2.11.3, worked for with the above plugin list. |
@SimonBrazell it's not true. I have tried both @8 and @9 and 3.0.0 and 2.11.3 and I am still getting that unspecified version error. |
@gelinger777 have you included |
Yes, I have included them in cordova 8 , didn't helped . In cordova 9 you don't need to include the cordova-plugin-androidx because it supports it out of the box. Just you need to add specific tag in config.xml . That didn't helped unfortunately. To build APK I see you are using Android SDK Tools : 26.1.1 which is quite old one. Play Store will soon compulse to use SDK 30 on any app updates , and it's mandatory to have SDK 30 for new apps. probably that could be the reason .. I don't know. But the problem needs to be solved on Gradle Level IMHO . |
I'm not sure why Not sure if I can help you then, let me know if you have any luck. |
Which one do you use? 31? |
Android 29 by the looks of it, so not the latest, perhaps that accounts for the difference here? I've set |
Oh wait just reading the Cordova Android platform guide, you need to use the obsolete |
I just discovered that I am hit by this issue It tries to build on SDK 28. Maybe that's the reason... |
I've just updated my |
No luck, I'd stick with |
I will try to understand why it always sets the build to be on 28. Thanks for helping to debug |
No problem, good luck. |
Actually you'll need to target API 30 if it's a new app it seems so disregard what I just said, I'd only been updating existing apps until now so hadn't come across this before today. https://developer.android.com/distribute/best-practices/develop/target-sdk So I'm going to have to get API 30 working too... |
I have tried now with 29, and with 30 . Problem is not solvable. If OneSignal team will not solve the problem , I am going to abandone this plugin and move to Firebase Messeging. |
Dear @gdeglin Thank you for a great plugin which we were using since cordova 7. Now when we have to use other plugins which require androidx and cordova@9 , it seems your onesignal cordova plugin is incomplete and buggy in terms of gradle configuration. Unfortunately I don't have in the team core android developers, and thus we are using ionic framework with cordova . Because of this issue the plugin you provided is not anymore building properly and is useless. I have spent almost 2 full days last weekend trying to make it work. I have tried cordova@8 and cordova@9 with native androidX enabler and/without with cordova-plugin-androidx . I have tries SDK 29, and 30 with Many different tricks. I have also uninstalled cordova-plugin-facebook-connect and cordova-appsflyer-sdk plugins. I have tried to add onesignal before and after and without it. I made almost 100 different tries to build it with no success. It's really frustrating. Could you please urge this issue to be solved internally? Since 11 days I am watching this issue with hope that one of team members would have a deeper look into it. Can we have a solution for this or we have to abandone onesignal? @jkasten2 @Nightsd01 @mikechoch @Jeasmine @rgomezp @leemunroe @emawby @albertopq |
Remove onesignal-cordova-plugin 3.0.0
Hope help somebody ionic info
cordova plugins
No need: cordova-androidx-build 1.0.4 or similar |
dear @chacabuk I have tried ^2.11.4 and ^2.11.3 and ^2.11.2 with corodova 8 and cordova 9. It does not work. I still get the same error |
also you are using very few plugins , and you can live without androidx, but the combination I am using we are required to use androidx |
I was facing this same error. Here is how I was able to get it to work.
|
@bradical1379 I have updated the Android Studio. I have removed .gradle from home directory and invalidated. App is building , and seems is working (before it was also building and working), but |
@gelinger777 - which version of gradle are you using? Are you using Capacitor or Cordova? Which versions of those? |
@bradical1379 I am using Cordova. I wrote already up that I have tried to build on cordova@8, on cordova@9 and even on cordova@10. With very many different setups. Each Cordova version brings by default it;s own Gradle Settings and Versions. So I cannot say I am using Gradle 5 or 6 or 3. The latest try was on this one
I guess it's 6.5
And now I have followed your advice I am getting also
|
@gelinger777 - Understood. Thanks for the additional info. Since I am using Capacitor 3, my environment is just a little different. But, I am using Gradle 7.0, Cordova Android 7.0.0 and SDK Version 30 (which I believe is required now). Previously, I was unable to build my app, but after my upgrade to the new Studio and clearing my user gradle cache, I am able to build the and sign the app. I do still see the Plugin issue log out during the build, however, I can confirm I am able to send Push Notifications to an actual device. |
@bradical1379 thanks for your update. |
Error message is only informationalThe error / warning noted here can safely be ignored as it doesn't cause any build issues. Check for any other errors before or after this entry:
The "OneSignal Warning: Could not get AGP plugin version" message does come from the OneSignal-Gradle-Plugin but it safely defaults to Android Gradle Plugin 3.0.0 or newer logic when this message is shown. We will be making an update to show "Error 'Plugin-Version' of 'unspecified'" as debug logging only so this isn't a miss leading as an error. Errors buildingAs noted above the messages noted here won't cause a build failure. If your build fails please check for other errors in the log. If they seem to be related to OneSignal please open a new issue with relevant sections and can address them individually. |
Dear @jkasten2 thank you for clarification. At least we know now that we can safely ignore it. Have a nice weekend |
Hello , unfortunately still get this error when using android@10.1.1 , SDK 30 : Error 'Plugin-Version' of 'unspecified' for 'com.android.build.gradle.AppPlugin@63830252' is not a valid version number i test version 3.0.1 and 2.3.1 of onesignal-cordova-plugin , but same error any solution ? thanks. |
@JLWINC as stated by devs you can just ignore it. it's not something tragic. Things work despite of that error in build log |
@bpsdesigns The root of your error has to do with dependencies not resolving as noted by this line:
More information could be above or below to help resolve your issue. If it isn't clear still I recommend copying the full log as text into this issue. |
I managed to fix it by updating gradle to the latest version. It now builds successfully via Appflow |
Hi, it still happening with android 32, Another error raised in android 32 is ` Ionic & Onesignal both should look into it and provide some genune solution. |
Description:
When using gradlew bundleRelease I get the errors:
Environment
Ionic info:
Onesignal versions:
"@ionic-native/onesignal": "^5.31.1"
"onesignal-cordova-plugin": "^2.11.4"
Steps to Reproduce Issue:
From a fresh new app with no other plugins added:
I was following this setup: https://documentation.onesignal.com/docs/ionic-sdk-setup
I have tried with my project on two different pcs and tried to create a new project. The issue is still there.
Other people are having the same issue, with no solution yet:
https://stackoverflow.com/questions/67678333/error-plugin-version-of-unspecified-for-com-android-build-gradle-appplugin
On the github forum I couldn't find the solution either.
The text was updated successfully, but these errors were encountered: