Xamarin Studio cross platform app error - c#

At the moment I'm trying to launch empty app with cross-platform solution in Xamarin Studio.
I've tried make app with empty library project and shared library, both has same errors. Now unresolved problems are:
1) Build error:
Error XA5207: Please install package: 'Android Support Library' available in SDK installer. Java library file classes.jar doesn't exist. (XA5207) (*projectName*)
Error XA5207: Please install package: 'Android Support Library' available in SDK installer. Java library file libs/internal_impl-21.0.3.jar doesn't exist. (XA5207) (*projectName*)
This question didn't help me.
2) Some links says it could be because of old Mono.Android.Support.v4 component. My component version is 21.0.3.0. After clicking for update it says:
You are trying to install this package into a project that targets 'MonoAndroid,Version=v4.0', but the package does not contain any assembly references or content files that are compatible with that framework.
My Mono.Android assembly version is 0.0.0.0 and I dodn't know how to update it.
I've tried PCL project with PCL 4.5 - profile7. New projects builds normal, but after first project clean it gives me error about not found classes.jar file like described above. Another new PCL project still builds fine.
UPDATE
Error in PCL project occures not after clean - it occures with included Xamarin.Forms NuGet to Android project.
UPDATE
After rising target framework of android project to v4.0.3 I successfuly updated Mono.Android.Support.v4 component, but it still show me error about Please install package.
UPDATE
I'm using Windows 7 OS, same problem with all users including new user. But on another computer with Windows 8 it works. It is not a solution for me, but it can somehow help someone.

i think your java JDK and JRE not install properly and your path not set in your environment variable you must add your jdk path in that and if you are make application using cross platform then also add path SDK in your computer environmental variable. using CMD throw creating project.

Related

Could not install package - Package target the same as project's settings

I'm working on an Android project in Xamarin for Visual Studio.
I'm getting an error whereby the Xamarin.Facebook.Android SDK targets the 5.1 framework, which is what my
Target Framework(Compile using), Target Android version and Minimum Android version are all set to(Have tried different variants of higher and lower).
The package in question has a dependency of Android V7, which I have installed.
Have an added an image for good measure.
This is a fresh project, and i've tried rebuilding the solution after any trial-and-error changes to the project's properties.
Screenshot: https://ibb.co/jOtfKk
Is this a bug, or has someone else encountered this scenario?
Created another project and it miraculously worked this time.
Man I hate the VS, C# and Xamarin world.

Error loading packages in cross platform c# application

I offloaded a project which involved making a cross platform app from a website. My friend who was supposed to do the project, has given me a solution that contains a portable section and a droid section. The ios and windows apps will be made once i complete the remaining portions of the portable code.
Now, he used some packages that are failing to load completely on my system. He had compiled an apk from this code, so this code must be working, but I cannot resolve the issues with the packages. I removed the packages directory from the project he supplied to me, and rebuilt the project hoping the packages would restore themselves correctly. But I ended up with the same errors again.
Then I found that "Mono.Android" and "RestSharp" were marked with warning signs under the references list. So I removed these two, and tried installing them fresh from Nuget Package Manager. Trying to install RestSharp gave me the following error:
Could not install package 'RestSharp 104.5.0'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile259', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
And I also cannot find "Mono.Android" package in the Nuget Package Manager. My friend was unable to help me out on this. Please suggest how to get this project working.
Thanks in advance.
Debopam Parua

Xamarin SignalR Android System.Net.Http.Extensions.dll

This is my first attempt at a Xamarin Android project. I have created a SignalR server in a console application and this is working fine. I am trying to create a Xamarin Android project in Visual Studio that can use SignalR to connect to my server. I have used nuget to add
Microsoft.AspNet.SignalR.Client
and
Newtonsoft.Json
When I try to build the project I am getting tthis error.
Error Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assemblySystem.Net.Http.Extensions, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Perhaps it doesn't exist in the Mono for Android profile?
I can't find anything on Nuget called
System.Net.Http.Extensions.dll
I have tried this and it works with VisualStudio 2015
I downloaded the complete package from Xamarin account which is just one step to create.
And then go to the signalR package for Xamarin, and download the complete package.
the go for the following path
yourdownlodfolder\signalr-2.1.2.2\signalr-2.1.2.2\lib\android
you will find something like
Include it in your bin folder. and than add refenrences manually .
and you are done. Now follow the steps mentioned in the above link to create HubProxy
I'm facing the same problem.
After install the SignalR Client on my Xamarin Forms PCL application, the Android app breaks on build.
I opened a issue on the github. Posted a simple repo app.
The SignalR is the major functionality, so I'm pretty much stuck.
https://github.com/SignalR/SignalR/issues/3775
In my case, to solve the problem i installed the nuget Microsoft.Net.Http and rebuild de project.

UWP Windows-10 Cannot add Microsoft.NETCore.UniversalWindowsPlatform to my C# app

I have a C# app targeting windows UWP. It was all working fine couple month's ago. When I opened it today, it cannot find this reference: Microsoft.NETCore.UniversalWindowsPlatform. I am unable to install this reference as well. Here are my project details & the steps I have followed:
My VS details:
MS VS Professional 2015
Version 14.0.25123.00 Update 2
Microsoft .NET Framework
Version 4.6.01038
When I try to install this reference: Referencs(right click)->Manage NuGet Packages, & then by selecting Microsoft.NETCore.UniversalWindowsPlatform, I get this error:
Could not install package 'Microsoft.NETCore.Platforms 1.0.0'. You are trying to install this package into a project that targets '.NETCore,Version=v5.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
I have NuGet Package Manager for Visual Studio 2015 Version 3.4.3.855 installed.
Based on the suggestion available here Github MS UWP samples page I deleted project.json from my project, but that doesnt seem to help me. Unfortunately I do not see project.lock.json file in my project
I had similar exception after copy solution folder to other machine.
In project.lock.json in field "packageFolders" and "project" where my settings for previse machine, I have changed them and it resolve my issue

Azure Mobile Services nuget won't install in new VS 2015 project

I am trying to create an Azure Mobile Services cross platform app. I am using Xamarin.Forms, so have been trying to follow this tutorial. However, I am not getting very far... I create a new Xamarin Forms project in Visual Studio 2015 and opening the nuget manager. I try to install Azure Mobile Services into each project in the solution. But I get the following set of errors:
Unexpected error - Please file a bug report at http://bugzilla.xamarin.com. Reason: System.IO.FileNotFoundException: Could not load assembly 'Azure_Test, Version=, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile? Azure_Test.Droid
Could not install package 'Microsoft.Bcl.Build 1.0.14'. You are trying to install this package into a project that targets 'Xamarin.iOS,Version=v1.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
I have filed a bugzilla case, but it seems like a pretty straight forward thing, so I wondered if there is anything I have done wrong there is a workaround?
Had this the other day. Before you install the Mobile Services package install the Microsoft.Bcl.Build nuget package. After that, I was able to install flawlessly.

Categories