Why my UWP package is being rejected? - c#

I've created a pretty simple app that uses banner ads.
App works great with debuging mode with ads test ads showing up. But when I'm creating a appxupload and uploading it to store I'm getting error.
Your package Microsoft.Advertising.Xaml specifies version 10.1707.2.0, but 10.0.0.0 is the minimum available version.
What exactly is the problem, why package is getting rejected and how can it be resolved?

According to the description of the error, you have installed Microsoft.Advertising.Xaml package which can't work on the Windows version below 10.1707.2.0 (which hasn't even been released to the general public). Your app declares that it can work on every version of Windows 10. This is in a collision.

Had the EXACT same problem. Finally got mine to work by uninstalling the MSI from https://marketplace.visualstudio.com/items?itemName=AdMediator.MicrosoftAdvertisingSDK and installing the Microsoft.Advertising.XAML from NUGET package manager. It was only 1 version earlier, but let me publish my app to the store.

Related

UWP Microsoft.UI.Xaml.2.1 API not found

I was trying to run one of my apps after a fresh windows installation, and then I get this message in Visual Studio:
Severity Code Description Project File Line Suppression State
Error DEP0700: Registration of the app failed. [0x80073CF3] Windows cannot install package 464|APPPUBLISHER|.|APPNAME|_1.7.0.0_x86__yejd587sfa94t because this package depends on a framework that could not be found. Provide the framework "Microsoft.UI.Xaml.2.1" published by "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or x86 processor architecture and minimum version 2.11904.5004.0, along with this package to install. The frameworks with name "Microsoft.UI.Xaml.2.1" currently installed are: {} |APPNAME|
And here is a screenshot (The app name and publisher are hidden):
Does anybody know a solution for this?
Also, in a desperate case, if I publish a recreation of this app in the Microsoft Store, will it install properly?
Edit: it seems like every time I change the version of the app, the package that won't install synchronizes with the changes
Edit 2: Is there any way to download this package from NuGet or restore it to the app package?
Edit 3: This app was always a big problem and never behaved as it should. This isn't the first time I'm having similar problems
Have you tried to right click on references, Select Manage NuGet Packages and searched for that package?
I found a solution to this problem and, actually, the only solution. Since this app had a history of API problems, I decided to make a new one with the exact same properties, but with some fresh NuGet packages. This solved the issue and improved the performance a lot. Now, I don't have to worry about it failing to load every time I reinstall Windows since it was the only app that caused problems.
The package that this app was asking for was a cache that I couldn't get rid of, and was stuck in the files as a dependency on something that doesn't even exist.

Problem with build agent demands not validated for android build

I've included my own machine as DevOps Build Agent. This machine can build Android Apps without problems. But still it complains about demands not met:
java
JDK
AndroidSDK
vstest
Agent.Version -gtVersion 2.116.0
I installed the latest Java Development Kit 8, this should add java and JDK, but still it complains. Agent version is newer than 2.116, and latest Visual Studio is installed on the machine.
Could anyone guide me in the right direction here. I can't see anything missing on the machine, but still it's not valid for the Agent Pool to build Xamarin Android Apps.
It is possible that this is resolved in the latest version of the agent. There is some discussion on the repo that looks like this issue. The workaround you mentioned worked in comments about adding AndroidSDK variable to the agent is also captured in the discussion there.

Xamarin.Android: Can not debug

I have a problem with Visual Studio Community 2015 and Xamarin.
When I want to debug my Program the virtual device start but the App does not open.
This is the Log:
1>"aapt.exe" exited with code -1073741819.
1>The file "obj\Debug\android\bin\packaged_resources" does not exist.
I don´t know how to fix this problem, I hope you can help me.
Complete Log: Here
This is a known issue currently, where a too new version of Android SDK Build-tools. This error will occur when version 24.x is used, due to Xamarin being compatible with 23.x
We have a technical bulletin available on our release blog, which describes the issue and the solution:
Recommended fix: Uninstall Android SDK Build-tools version 24 using
the Android SDK Manager.
Another separate issue is that version 24 of the Android SDK
Build-tools package requires Java JDK 1.8 or higher. This can cause at
least 1 error:
“java.lang.UnsupportedClassVersionError: com/android/dx/command/Main :
Unsupported major.minor version 52.0”
Source: https://releases.xamarin.com/technical-bulletin-android-sdk-build-tools-24/
Thanks!
Here are a few solutions that worked for some users, as this error might have multiple causes :
Check your AndroidManifest.xml file for any typo. File names must not contain characters like -. This is also the case for any code file. Oh, and by the way, don't use keywords as file names. For example, a file named New.cs might break your app.
Check that the Android SDK you're targeting is installed on your computer. Click Tools->Android->Package manager and install or update the SDK you're targeting. Also, install tools, build tools and platform tools. You might want Android Support Library and Google Play Services too.
According to the logs you put on pastebin, it seems like the last thing done before the build fail is to check for Android SDK Build tools rev 24. There is high chances you lack those files, or that some are corrupted. I'd delete and reinstall everything.

Xamarin - Android - Visual Studio - The application could not be started

I was working on an Android project using Xamarin in Visual Studio 2012. I recently upgraded from an HDD to a SSD so I reinstalled Windows and all of my programs.
After cloning my git repository and trying to run the application on my device, I have not been able to get it to run. I was able to start a new hello world project and I got that to run, but I can't get this project to run.
This is what the error says:
The application could not be started. Ensure that the application has been installed to the target device and has a launchable activity (MainLauncher = true).
Additionally, check Build->Configuration Manager to ensure this project is set to Deploy for this configuration.
I have searched for a solution to this issue but have been unable to find anything that worked.
I solved the issue. Somehow the application still existed on my device even though it did not show up in my applications and I needed to remove it.
The solution was to find an old APK that I had emailed and I installed that. Then I uninstalled the application and deployed it again from Visual Studio. This time it worked.
You can read more here: https://forums.xamarin.com/discussion/8501/install-failed-update-incompatible
EDIT (March 13th, 2017):
Seems a lot of people found this answer useful so I decided I should update it with an alternate method to uninstall the app if you don't have access to an old version.
As Atul Chaudhary and Nestel mentioned, you can open up your adb command prompt and run adb uninstall <com.your.application.package.name>. If there are any remnants of your application which remain this should get rid of them.
Renamed Application name.
Added Package name.
App. started working on Emulator, Renamed application again, app. continued to run.
Note: Resetting device, un-installing the app. and related runtime etc. from settings did not work for me.
Hope this helps someone.
Running this command from the adb shell solved it for me:
adb shell pm uninstall -k com.packagename
To access the adb shell from Visual Studio Tools -> Android -> Android Adb Command Prompt.
Very interesting error, seems like Visual Studio is unable to unistall the previous version completely.
Obviously the OP figured out the issue to their problem but I still wanted to post an answer relating to an issue I had with the same error message. I am using Visual Studio (within Parallels) and attempting to debug the app on a Xamarin Android Player instance (which is running on my Mac).
I kept getting this error and realized that a different, more helpful, error message was showing up in the Build Output saying that I was not supporting the correct architecture.
Heading into the Android Project Properties -> Android Options -> Advanced -> and checking x86 finally allowed my to successfully deploy to the Xamarin Android Player.
The ADB approach does not worked for me.
I did not want to factory reset my phone nor uninstall my apps so I have managed to deploy by changing the package.
Right click on your Droid project
Select Properties
Got to Application Manifest
Change the Package name
Re-deploy your project
Hope this helps
I had the same error today, trying to run Xamarin Android-app on Xamarin Android Player. To fix it I needed to check the "x86" box at the "Supported architectures" section. So you might want check this section.
I experienced this problem when there was not sufficient memory on device. After "successful" deployment the app was missing even from the app list in Settings. Deleting through adb gave me Failure which indicated it was not installed. In Output log in VS2015 I was having the same message as OP. Finally it worked after I cleaned up about 50-100 MB, even though in App Settings it showed me that there were 500 MB free. I tried different solutions (deleting through adb, cleaning, building then deploying) but only cleaning up worked.
adb uninstall did the trick. The strange thing is that even if you run the command to list all app that are installed it will not show up but if you run the uninstall command with ur package name which should be ur project name or name that you have assigned you will get the success result which means it got uninstalled and to check that if run the uninstall command again with same package name u will get failure command. Then deploying ur package again should work
In my case issue was two activities were Launcher activities,so I made one of them Launcher activity.
You can remove
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter> from AndroidManifest.xml file or
MainLauncher = true from .cs Activity file attribute
If you've reinstalled everything you may have to set the configuration manager back up in VS.
In Visual Studio: Build -> Configuration Manager -> Put a check in the "Deploy" box.
I've managed to solve it by wiping user data from emulator.
From AVD Manager, when you start the emulator, check "Wipe user data" and your emulated device will behave like new.
Problem itself appeared after updating to Android SDK Tools 25.1.3.
I could not get this working, initially. Tried removing everything (Mono runtime, app, etc.), but to no avail.
What did work was renaming my package, which was fine in my case since I haven't release my apk yet. Some ghost version is obviously still stored on my unit.
Renaming Application Name and Package Name (go to Manifest settings) where helped to resolve this issue
The only alternatives which help me solve this were the following:
From the Xamarin Android Studio home page (where all devices are displayed), click on the "three-dots" button and then Factory Reset.
OR
Install a new device and deploy your app there.
Whenever I encounter this problem, I publish the app and install in manually using
adb install "<path to apk file>"
in the Android Adb Command Prompt.
Hopefully, a fix is out soon, according to
https://github.com/xamarin/xamarin-android/issues/3727
Happened to me today, after updating a project from Git and running in Android Emulator. Uninstalling the app from emulator, performing Clean and Rebuild in VS and instaling the application again helped.

Azure compute emulator stopped working after upgrade to version 2.8, prerequisite error

I upgraded my azure sdk to version 2.8 from 2.5 today and have not been able to get the compute emulator going ever since.
I receive a popup indicating
"The system is missing a prerequisite to execute the service."
When I look at the output screen, i see the following message scrolling down the screen:
"Microsoft Azure Tools: Error: The installed Microsoft Azure Compute
Emulator does not support the role binaries. Please install the latest
Microsoft Azure Compute Emulator and try again. Microsoft Azure Tools:
Warning: The role binaries in your package are using an older version
of the Microsoft Azure SDK. Please consider upgrading."
As I have several role instances I am having a problem determining which one(s) could be the culprit or what is the problem.
The weird thing is that I updated all of the referenced using nuget. One thing I noticed was that the Microsoft.WindowsAzure.ServiceRuntime.dll seems to have a version of 2.7.0.0 even though it is in a directory called v2.8. The other two dll's tied to azure, Microsoft.WindowsAzure.Diagnostics(2.8.0.0) and Microsoft.WindowsAzure.Storage(6.2.0.0) seem to point to other versions.
I am not sure if the problem is that I have to repoint these dll's or if there is a deeper issue going on?
You still need to perform the tool upgrade on your Azure publishing project. Right click on your Azure publish project (*.ccproj type?) and select Properties.
From this screen, select Application and click the Upgrade button. I have attached a screen shot showing I have a project I need to upgrade from 2.7 to 2.8. The red circle on the far right is the project you should perform the right click on (I don't know the actual project type name).

Categories