Closed robpinto closed 3 years ago
@robpinto Do you get any other errors or warnings other than one you list?
Error 'Plugin-Version' of 'unspecified' for 'com.android.build.gradle.AppPlugin@2f524b82' is not a valid version number OneSignal Warning: Could not get AGP plugin version
It indicates this is an error but this should not interrupt the build process and it should continue so this isn't the root cause of the build failure.
Same error here, starting today when I updated an app:
`> cordova build android --release cordova-plugin-androidx-adapter: Processed 144 Java source files in 1955ms Preparing Firebase on Android Checking Java JDK and Android SDK versions Subproject Path: CordovaLib Subproject Path: app Starting a Gradle Daemon (subsequent builds will be faster)
Configure project :app Error 'Plugin-Version' of 'unspecified' for 'com.android.build.gradle.AppPlugin@6bd8052e' is not a valid version number OneSignal Warning: Could not get AGP plugin version`
The build finished but app does not receive notifications.
The build finished but the app did not receive notifications. But after removing/readding platform Android on Ionic, it now works, even if error message is still present during build process. Needles to say, that it was the n-th time I tried to remove and than add platorm. So I do not undestand why this time that worked.
@robpinto Thanks for the details, glad to hear things are working for you now.
@devgithub43 There are a number of reasons why a notification would not be shown on the device when OneSignal reports it was successfully sent do the device. I recommend following this troubleshooting guide for this. https://documentation.onesignal.com/docs/notifications-show-successful-but-are-not-being-shown#android-mobile-app-notifications-not-showing
The warning should be cleaned up in PR #149 once it is completed and put into a release.
Same problem for me too Error 'Plugin-Version' of 'unspecified' for 'com.android.build.gradle.AppPlugin@30aa0787' is not a valid version number OneSignal Warning: Could not get AGP plugin version
O mesmo problema para mim também Erro 'Versão do plug-in' de 'não especificado' para 'com.android.build.gradle.AppPlugin@30aa0787' não é um número de versão válido OneSignal Aviso: Não foi possível obter a versão do plug-in AGP
I have the same problem
me too have the same problem
Same here
have you found a solution since 3 weeks ?
same problem here
Same here
I have the same problem. Please, if anyone has the solution. In my case the project is in IOnic 5 with angular.
This error doesn't interrupt the build process as this plugin moves on and assumes you have a new enough version.
If you are having any issue with OneSignal I recommend checking the full log for any other errors or warnings. Please open a new issue with all the details and we can take a look.
i have tried this
ionic cordova plugin add cordova-plugin-androidx ionic cordova plugin add cordova-plugin-androidx-adapter
Working fine Now.
@sehgalneha I'm on Cordova 9.0 and cordova-plugin-androidx is for < 9.0
cordova-plugin-androidx-adapter is installed fine, however.
But still the error:
Error 'Plugin-Version' of 'unspecified' for 'com.android.build.gradle.AppPlugin@1832e037' is not a valid version number OneSignal Warning: Could not get AGP plugin version
Me too have the same problem
Same here
me too :(
I solved changing android/app/build.gradle
buildscript to:
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' } // Gradle Plugin Portal
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.10, 0.99.99]'
}
}
AND moving this code to top:
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
I have the same problem. Please, if anyone has the solution. In my case the project is in IOnic 5 with angular. Me too, but with ionic 6
You can safely ignore this warning, it does not affect the rest of the build.
Error 'Plugin-Version' of 'unspecified' for 'com.android.build.gradle.AppPlugin@1832e037' is not a valid version number OneSignal Warning: Could not get AGP plugin version
If your build is failing then looking below this error, there will be a different root cause.
@sehgalneha I'm on Cordova 9.0 and cordova-plugin-androidx is for < 9.0
cordova-plugin-androidx-adapter is installed fine, however.
But still the error:
Error 'Plugin-Version' of 'unspecified' for 'com.android.build.gradle.AppPlugin@1832e037' is not a valid version number OneSignal Warning: Could not get AGP plugin version
In my case works! With Ionic 6 and Cordova 9.0. But I do some things before, like delete and reinstall platforms and node_modules, and update Gradle to 7.0. Tell me if that works for you.
Hello, it is actually not a onesignal problem, the warning comes out, it should allow compiling.
The problem in my case in is that in:
/android/app/src/main/AndroidManifest.xml
this line was duplicated:
<uses-feature android: name = "android.hardware.location.gps" android: required = "true" />
There were two puglings that used "Geolocation" and "GoogleMaps"
You can do a search in the plugins folder of the project:
in this case the search would be "location.gps" which was the error that came out in the console
we look for this file:
plugins/cordova-plugin-googlemaps/plugin.xml
and we remove the line where they invoke it.
Important: Check in your cases in the list of plugins that use it that do not have the required label.
In my case, the geolocation plugin had it and that is why I decided to eliminate the googlemaps plugin, which did not have the required one.
<uses-feature android: name = "android.hardware.location.gps" android: required = "$ GPS_REQUIRED" />
I hope to help someone who has this problem.
Greetings
Hello, it is actually not a onesignal problem, the warning comes out, it should allow compiling.
The problem in my case in is that in:
/android/app/src/main/AndroidManifest.xml
this line was duplicated:
<uses-feature android: name = "android.hardware.location.gps" android: required = "true" />
There were two puglings that used "Geolocation" and "GoogleMaps"
You can do a search in the plugins folder of the project:
in this case the search would be "location.gps" which was the error that came out in the console
we look for this file:
plugins/cordova-plugin-googlemaps/plugin.xml
and we remove the line where they invoke it.Important: Check in your cases in the list of plugins that use it that do not have the required label.
In my case, the geolocation plugin had it and that is why I decided to eliminate the googlemaps plugin, which did not have the required one.
<uses-feature android: name = "android.hardware.location.gps" android: required = "$ GPS_REQUIRED" />
I hope to help someone who has this problem.
Greetings
Thanks ! That works for me !
Hi @2diegoduque I'm having same issue, but I can't find any file with "location.gps", do you have some other tip about this?
`> Task :app:processDebugManifest FAILED
/home/ficast/Documents/tsl/gada/gada-app/platforms/android/app/src/main/AndroidManifest.xml:40:5-66 Error:
Element uses-feature#android.hardware.location.gps at AndroidManifest.xml:40:5-66 duplicated with element declared at AndroidManifest.xml:36:5-90
/home/ficast/Documents/tsl/gada/gada-app/platforms/android/app/src/main/AndroidManifest.xml Error:
Validation failed, exiting
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
FAILURE: Build failed with an exception.`
@ficast I recommend that vscode give it a search in the plugins folder and as a search parameter you put "location.gps" there you should see the plugins that use it, you should look at which one is not required and the other one you delete.
Try to use these versions: npm i onesignal-cordova-plugin@2.11.3 npm i @ionic-native/onesignal@5.31.1
this solved my issue, i think this problem occur because current latest version of onesignal cordova plugin is 3.0.0(beta1) so because of this is beta version so i think this problem is occurring now.
try to install previous versions,
The false positive OneSignal Warning: Could not get AGP plugin version
warning has been fixed in version 0.13.0. Note, that version 0.13.4 is recommended however.
If you are seeing any other errors or warning please open a new issue here if it is related to this plugin specifically, or in the OneSignal-Cordova-SDK repo if it relates to Cordova or Ionic with OneSignal. Thanks.
My Ionic App did build corectly with androi-cordova 8.1.0, but starting from today it gives these error. Tried to remove Platform and/or plugin and various versions of gradle, but nothing changes.
Project Setup
build.gradle
app/build.gradle
Full Error
Dependency Tree
Run
./gradlew app:dependencies