How to change version of Mobile App in Xamarin? - xamarin

I want to change the version of my application but when I am changing the version and version name I am getting an error: "Build Failed: Xamarin.Android does not support running the previous version. Please ensure your solution builds before running or debugging it.". When I change the version name to 1.8.2 the error will occur. How can I fix this?

As mentioned in the comments by Arvindraja, Visual Studio will prompt to deploy the previously built version if there were build errors. In the screenshot you've posted, you're showing no app icon. Perhaps that is causing this issue?
Go through the build output and see what the output says. At some point, there should be a mention of "Build failed", or similar.

Related

Lottie nuget, throws "java exited with code 1" error in Android (Xamarin forms)

I have installed Com.Airbnb.Xamarin.Forms.Lottie nuget version 4.0.8. When I have run the app in Android device it throws java exited with code 1 error at compile time.
In my project Xamarin.Forms nuget version is 4.8.0.1821
Pro guard is disabled in my Android build option and Multidex option is also enabled. Also I have tried to increase heap size but it still not works, does anyone know how to fix this or any workaround?
Build Output:
I have figured out the real reason of this error. This error is actually cause by the modernhttpclient (2.4.2). I have removed this nuget from all projects and the error is gone! So, the real culprit is modernhttpclient and not Lottie.
I hope this might be helpful to someone.

How do I fix this command prompt error regarding these error messages?

So I already have these installed. I had Android Studio 4.2.0 but deleted it and got 4.1.0 to fit the circumstances. Now, it's telling me to get 4.0 and 4.1, which is confusing me a lot. I have Flutter and Dart installed, so I don't understand where I went wrong. s
I think your previous version of Android Studio isn't deleted properly. Try deleting its caches too. And I don't think these dart and flutter plugins installation is required for you as you are using visual studio code.
Try running a sample project and see if it runs or not.
Happy Coding

Xamarin.android project build error in xamarin forms project

I have tried to resolve fallowing error but not luck, What my issue is while build xamarin.android project shows 'java.lang.IllegalArgumentException: already added :Landroid/support/v4/accessibilityservice/Accessibility
ServiceInfoCompat' error. I have search the cause of this error, many solutions are said that duplicate library files exist in our project i.e "xamarin.android.support.v4 and xamarin.android.support.v7". If I have remove any one of this again I am getting build faileds. If I have remove 'xamarin.android.support.v4' shows "view.pager" not found error and if I have remove 'xamarin.android.support.v7' getting lot of errors. Please suggest any idea to fix this issue. Thanks in advance.
'
Earlier I faced the same issue, I had done these steps to solve it
1) First check the Target Framework i.e Mono Android it should be version more than 7.0 ,if it is not available in the properties. Update your Android SDK manager then you can set to v7.0
2)Uninstall the Xamarin.Forms packages and support files and Reinstall all with latest version

Visual studio for mac not building

When I build my project in debug mode it builds forever. However there is no problem building in release mode.
This problem first occurred when I updated visual studio for mac to the newest version:
Preview 6 (7.0 build 2740).
This is what my debug settings look like:
Any ideas are much appreciated.
Check for xamarin.forms updates in both in the ios and xamarin project. It could be that theese are not updated even though the solution is updated.
Xamarin.forms package under the iOS project might have an older version
I cannot really help you because I don't know what type of project you tried to run or which OS X you are working with.
If such an Error occurs, always check your code or try restarting your mac.
Tip: "Visual Studio for Mac Preview" is still in its Alpha. Use the Stable Update channel to avoid errors like this.

Xamarin - Project failed to build after adding Google cloud messagin component

I've Google Cloud Messaging to my project but after adding it, Project stopped building. It gives build output as
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1135,2): error MSB6006: "aapt.exe" exited with code 1.
I searched through net and got info to turn on the "Log verbosity to Diagnostic". It gives the build out in detailed form and after going through the log I came to know that during build below lines gets added to manifest file:
provider android:authorities="${applicationId}.google_measurement_service" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementContentProvider"
Issue here is the "${applicationId}", during build it should get replaced with ApplicationId.
This issue can be fixed on Android Studio by doing changes the Gradle file but I'm using Xamarin.
I'm using GCM version 29.0.0.2.
Please let me know the possible workaround.
Thanks
The current version of GCM is dependent on Google Measurement service and the error is related to Google Measurement Service.
To solve the issue I downgraded the GCM to the version which is not dependent on Google Measurement service.
you can't do it straight away as Nugget downloads the latest version. So in order to downgrade the version of GCM. Remove the updated version and specify the version of GCM to be downloaded in packages.config file.
Xamarin Studio will consider the specified version as missing package and automatically download the mentioned package.
In my case I downloaded the 27.0.0 version of GCM.

Resources