Xamarin Forms 2.3.3.193 and ads - android

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

Related

PHONEGAP - Error while starting emulated android on phonegap; I use the SDK installed by android Studio

The error I get on the console; When I run the command "phonegap emulate android"
->Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK. Looked here: C:\Users\wende\AppData\Local\Android\sdk\tools\templates\gradle\wrapper
I also experienced this issue (among many others) in my attempts to get a phonegap app to work in my environment.
I found a solution in the second response (by jcesarmobile) to this question:
Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK - Android
Specifically, I had to make sure my Android Studio and Android SDK Tools were updated to the latest version, and then I had to update my Cordova Android platform to version 6.2.2.
phonegap cordova platform rm android
phonegap cordova platform add android#6.2.2

Google Analytics Cordova Plugin not working with Android Ionic App

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

Google Play services: Error while building ionic android app

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

Cordova failing to build on android

I'm attempting to build my android project via terminal. I have the /android-sdk/macosx in my downloads and I have the API 23 installed. I also have Google Play Services and Google Respository installed in Extras (within SDK Manager).
I'm receiving a build error when attempting to cordova build android as seen below. Am I missing something in my build setup? Any help is appreciated.
I solved this by running the SDK manager -> update for Android Support Repository -> Android Support Library

Porting existing Cordova app into Android Studio

I have an existing Cordova app that I've been testing in Xcode.
The workflow was simple:
1. cordova build ios
2. open xcode project file in Xcode
3. either run in simulator or build directly to device
I'm tyring to figure out the same for running an Android build for testing.
1. Installed Android Studio
2. Installed and configured Android SDK 19
3. When I setup my run configuration, it says:
"AndroidManifest.xml doesn't exist or has incorrect root tag"
I've followed the trail to Cradle, migrating existing project to Cradle, but have been unsuccessful so far in figuring out how to take an existing Cordova project and getting it to run on my device.
Is there a workflow as easy as Xcode's 1...2...3... for Android?
As far as I know, android studio isn't officially supported by cordova/phonegap yet, you should use the ADT.
But here you can read how to work with android studio beta and cordova/phonegap
http://iphonedevlog.wordpress.com/2014/10/10/using-android-studio-beta-with-cordova-phonegap/

Categories

Resources