I am creating new ionic application. In this app I have added Google Play services package revision no. 31. Also added package to my app cordova plugin add cordova-plugin-googleplus. This is used for google plus authentication.
So now I am facing problem while building android app using ionic build android. It gives me following error,
But when I remove the package cordova plugin remove cordova-plugin-googleplus and build the app it succeeds.
Is it because of the revision number of googleplus package?
The problem is because you Android SDK does not have Google Play Services installed. Therefore, it cannot compile your application which has Google Play Services reference (and Android SDK does not have those). Go to your Android SDK Manager and install Google Play Services for your android API version. PS you can see those errors in your console.
Found the solution,
I have downgrade the following packages to previous revision.
Remember you need to restart your machine if you are using windows to reflect changes in android sdk.
The error comes because this app is not using androidX but these plugins solve errors.Use these two plugin. Its solved my issueionic cordova plugin add cordova-plugin-androidx && ionic cordova plugin add cordova-plugin-androidx-adapter
Related
I have a problem with advertisement for iOS and Android. I'm creating a cross platform app I should insert some advertisement. For this reason I created a component in the main project and in each platform project I render it with the right components.
I'm using Visual Studio 2017 and Xamarin Forms 2.3.3.193.
iOS
For iOS I added Firebase AdMob for iOS (7.15.0.1) and its dependencies.
When I compile the project I receive an error
Xamarin.Build.Download.targets(38,3): error : Object reference not set to an instance of an object.
It is the same error if I update this component to version 0.4.2
Android
In Android I added Google Play Services ver. 42.1001.0.0, I receive an error from java.exe (I described this error in another post)
java code 2
I tried to update everything but the result is exactly the same. If I removed all Xamarin.GooglePlayService and I install Google Play Services ver. 29.0.0.2 the app is working fine without any errors.
For both project I created a new cross platform project and I added all components until I found the error came from the ads.
Any suggestions? Thanks you in advance.
For iOS you can install a prelease of the Xamarin.Build with this command:
Install-Package Xamarin.Build.Download -Version 0.4.3-beta1 -Pre
For Android you can install Google Play Services ver. 29.0.0.2
I am trying to get google analytics setup with my ionic Android app using this plugin: https://github.com/danwilson/google-analytics-plugin.It works fine with my iOS ionic app.
I'm using the 1.6.0 version of the plugin; using commands such as "trackView" or "trackEvent" doesn't record anything to the analytics control panel. I have no console errors and initializing with "startTrackerWithId" using the key is successful.
Running the app on an iOS phone shows up in analytics, but not for android. So not sure what the issue is and why it isn't working only for Android?
Had the same issue with version 1.7.4.
Downgrade to version 1.5.5 did the trick.
You can do it by running cordova plugin remove cordova-plugin-google-analytics and then cordova plugin add cordova-plugin-google-analytics#1.5.5
I am a little new to Salesforce Hybrid Mobile application development.
I have a well running hybrid application.
But recently when uploading the APK to play store, play store gives an error
Your APK has been rejected for containing security vulnerabilities, which violates the Malicious Behavior policy. The Alerts page has more information about how to resolve the issue. If you submitted an update, the previous version of your app is still live on Google Play.
After some analysis I found that my android platform version is 3.6.x which might be the reason for rejection.
So I updated cordova android platform of my existing Salesforce Hybrid app using the following command.
cordova platform update android
After updating the version of android platform is 5.2.2
Salesforce Mobile sdk guide says to reinstall the salesforce plugin
So,
cordova plugin remove com.salesforce
And then
cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin
But, while re-adding the plugin it gives the following message
Plugin doesn't support this project's cordova-android version. cordova-android: 5.2.2, failed version requirement: 5.0.0
Skipping 'com.salesforce' for android
And again running the project in eclipse gives many errors.
Not able to pin point the specefic issue here.
Any help is appretiated.
Thanks in advance.
You have to update to 5.0.0 instead of 5.2.2 because Salesforce plugin is made to 5.0.0 version.
You can see that in the plugin.xml file, in the engine tag.
<engines>
<engine name="cordova-android" version="5.0.0" />
<engine name="cordova-ios" version="4.2.0" />
</engines>
I have an app published on Google Play and I have received this warning recently:
https://support.google.com/faqs/answer/6325474
I have upgraded cordova version via command line and re-uploaded the apk and I still get the same warning.
Any ideas on how to resolve this issue?
Thanks,
Chris
You need not necessarily update android version explicitly. Updating Cordova version through CLI automatically updates the cordova android version as well. All you need to do is to remove android platform and add it once again after cordova update and rebuild android platform again. Hope it helps.
Google Play is showing Cordova Security Alerts on my app. And they suggested me to update existing cordova version to higher at 4.1.1.
Please migrate your app(s) to Apache Cordova v.4.1.1 or higher as soon
as possible and increment the version number of the upgraded APK. If
you are using a 3rd party library that includes Apache Cordova, please
notify the 3rd party and work with them to address the issue.
I have already upgraded my Cordova version to: 4.2.0 and here is the code:
Mds-MacBook-Pro:BanglaGaanerTaroka Morol$ cordova -v
4.2.0
Mds-MacBook-Pro:BanglaGaanerTaroka Morol$
Google Play Developer console still showing this alert and that affected my latest APK version too.
Is there anyone facing the same issue? Or how to solve it?
Thanks in advance.
First of all, you should understand that there is a cordova CLI version and cordova platform versions.
When google play ask you to update to cordova 4.1.1, he is not asking you to update the CLI to cordova 4.1.1, he is asking you to update the cordova android (platform) version to 4.1.1.
If you update the CLI to 4.2.0 you get cordova android 3.6.4 that is still vulnerable.
So, the first thing you should do is to update the cli to 6.0.0 (latest version right now) with
npm install -g cordova
But updating the CLI isn't enough, you have to update your project too.
Go to your project folder and run
cordova platform update android
That will update your project to Cordova Android: ~5.1.0