I am using Xamarin 6.3 on a mac. I am very new to Xamarin.
I have a project open. I choose "Project" -> "Add NeGet Projects..."
I type "Mono" in the search box, and check the box next for Mono.Zeroconf, then choose "Add Package"
There are several lines of output, but the last line is:
Could not install package 'Mono.Zeroconf 0.9.0'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v4.4', 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 tried changing the version of my android package, but each one results in failure.
Thanks in advance for any assistance
This project doesn't support Xamarin.Android as it only contains libraries for desktop .NET 2.0. This library would need to support the MonoAndroid target or a PCL/dotnet standard target.
Sadly this library hasn't been updated since 2011 it looks like! Thus it is very unlikely it will support Xamarin.Android unless it's updated in the future.
Source:
https://github.com/mono/Mono.Zeroconf
Related
Please help!
I'm trying to run my IOS xamarin app and have the following Android error:
code
PackageReference Include="Xamarin.AndroidX.MediaRouter" Version="1.2.5"
PackageReference Include="Xamarin.AndroidX.Palette" Version="1.0.0.8"
code
If I remove them then I receive this error that they are required when I run in Android.
What should I do?
Make sure that "Xamarin.AndroidX.MediaRouter" and "Xamarin.AndroidX.Palette" only exist in Nuget of Android. If these two libraries are not used, delete these two libraries in all directories.
According to the tips of these two libraries, you need to ensure that your Android version is 9.
If you are running an iOS app, you shouldn't get an Android message, unless you accidentally added that Nuget package to your iOS solution
Check all the Nuget of the solution
Go to those Android packages.
If you check the right panel, you should see that those packages only have a version in the Android project. You should remove them from your shared or iOS project without problem.
I'm using android-sdk-plugin to make Android apps with Scala using SBT. This generally works great - however when trying to import the project into IntelliJ IDEA 14.1 the imported project looks rather empty and does not recognize my source files as being part of the project.
The documentation says:
IntelliJ 14 now includes native support for importing projects from android-sdk-plugin. The process generally works well, however there are still several caveats:
The idea-sbt-plugin is still required to actually perform the build (no longer necessary as of IDEA 14.1)
Cloning and importing even the simplest example project results in an empty IDE not showing any sources at all:
I have installed both the Scala plug-in and the SBT plug-in (which I believe should no longer be required) as requested by the documentation.
What essential step am I missing?
Edit: I added the plug-in manually to project/plugins.sbt, then ran gen-android to get a project/build.scala containing object Build extends android.AutoBuild.
The essential step missing is the Android plug-in of IDEA. This might seem obvious but in contrast to plug-ins for other frameworks this one does not just provide extra goodies but is actually essential for anything Android.
Having the plug-in installed allows for selecting Android as a Project SDK (which not just selects an Android SDK but also a Java SDK to go with it).
I've downloaded the source code of android widget "TextView".
I included some other packages, but Eclipse can't find them.
I've checked android source again and they exist there.
import android.content.UndoManager;
import android.text.GraphicsOperations;
import android.content.res.CompatibilityInfo;
So why doesn't Eclipse them? In source code they are also public.
I'm using Android 4.4.2.
If you are trying to build something that is part of AOSP and import it into eclipse, then you need to let eclipse know what those other packages are. Based on android, eclipse only knows about packages that are part of the SDK. This does not include all packages that are part of android.
If you look through the AOSP files, you will find methods and variables that are hidden. Some classes are simply not included in the SDK. Other packages are considered to be "internal" and thus you can not access them easily (infact, if a package is internal eclipse has a line that will specifically block all packages from being imported).
Most likely, you have not updated your build path to include an updated framework.jar file. There are quite a few resources available for these tasks. This answer here: How do I build the Android SDK with hidden and internal APIs available? will give you a quick rundown on how to get a framework.jar file simply if you are building aosp.
If you aren't building AOSP, I suggest you check out this guide here on using hidden and internal parts of the API. From a quick glance, it doesn't look like any of those packages are internal, so you should be fine by just importing the framework jar which contains all the classes and hidden methods.
Good luck!
Just a little list of quick fixes:
try right click on your android-project -> Android Tools -> Fix Project Properties
right click on your android-project -> Android Tools -> Add Support Library...
is your SDK up-to-date? You can check this in your SDK Manager
last thing: go on Project -> make sure that Build Automatically is checked and then do Clean...
I have been trying to work with a Library Project, just like it's mentioned in the documentation :
http://developer.android.com/guide/developing/eclipse-adt.html
I have created my Library Project as a Android 1.6 Project and now I have been trying to reference to it out of my second project (also an Android 1.6 project) and I am getting the following error :
"Target 'Android 1.6' does not support building project with libraries."
"ERROR: Unknown option '--auto-add-overlay'"
The documentation states that supported platfroms are the 1.5 onwards (with exception for the 2.0 & 2.0.1) and that the second project should have the same platform or higher (in my case the same)...
So any idea what's ahppening here ? And most importantly : any idea how to solve this ?
Thx in advance !
How is the library project compiled as? is it a jar file? And in eclipse, did you add it in Eclipse as "Project Name" -> Right click -> Configure build path -> Libraries. Click on Add External jars and add your jar file.
First of all to reiterate what was said in the previous comment..
A "Library Project" in Android terms is not just a dependent project or an external jar. It is an Android concept introduced by the Android team see below...
http://developer.android.com/guide/developing/eclipse-adt.html
Tiger, have you found a workaround to this yet?
I'm having exactly the same issue and after battling with this for a while now I'm pretty sure it's a bug (but this particular bug is quite old and might just look very similar) Have a look at:
http://code.google.com/p/android/issues/detail?id=8498
Yes, it appears that certain SDK levels in Linux aren't supporting the "--auto-add-overlay" option required when using libraries in Eclipse. I've found that 1.6 works find, as does 2.1-update1, but 2.0 fails. I ended up changing my app to rely on 2.1 instead of 2.0 and it worked.
I did a git on the com.android.music app and then created a project in eclipse from existing code. I chose 2.1 as the sdk target but I am getting errors trying to compile.
Is the music app referencing code that is not part of the 2.1 sdk? Can someone list the steps for how to compile in eclipse?
Description Resource Path Location Type
ArrayListCursor cannot be resolved to a type PlaylistBrowserActivity.java Music/src/com/android/music line 529 Java Problem
MediaFile cannot be resolved AlbumBrowserActivity.java
Is the music app referencing code that
is not part of the 2.1 sdk?
Absolutely. Most of the built-in apps for Android were created before there was an SDK. You will not be able to build them in isolation from the rest of the firmware without substantial work. Work which, BTW, would be welcome contributions back to the Android open source project, if you were so inclined... :-)
Check the applications manifest file. It will contain an attribute stating which version of the SDK the application was built with.