Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xamarin.Android - Compile error for "Release" build with Linking="Sdk Assemblies only" #629

Closed
jzhouw opened this issue Mar 14, 2014 · 7 comments
Labels
s/needs-more-info Needs more information from the reporter

Comments

@jzhouw
Copy link

jzhouw commented Mar 14, 2014

I got below compile error when under "Release" mode with "Linking" option set to "Sdk Assemblies only", I don't want to use Linking = none. Any idea what is going wrong?

The "LinkAssemblies" task failed unexpectedly. Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'System.Void Android.Views.View::set_Activated(System.Boolean)' (defined in 'Cirrious.MvvmCross.Binding.Droid, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') from 'Cirrious.MvvmCross.Binding.Droid, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved. at Xamarin.Android.Diagnostic.Error(Int32 code, String message, Object[] args) at Xamarin.Android.Tasks.LinkAssemblies.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext()

But I changed the Android app build option for "Compiling with Android Version" from Level 10 to Level 12, then the error gone

this error was also posted at http://forums.xamarin.com/discussion/comment/47517#Comment_47517

@Cheesebaron
Copy link
Member

Related to issue #607

@slodge
Copy link
Contributor

slodge commented Mar 16, 2014

@Cheesebaron is correct :)

With latest MvvmCross packages, you do need to compile with Honeycomb or above SDK.

This does not stop you targetting earlier Android versions - but it just allows us to do some runtime switching which allows us to better support newer versions.

If in doubt, blame Android fragmentation - sorry!

Stuart

@slodge slodge closed this as completed Mar 16, 2014
@alexeystrakh
Copy link

Stuart, could you please confirm that there is no chance to compile it with API level 8+ any more?

@slodge
Copy link
Contributor

slodge commented Mar 26, 2014

We still support Android 2.x - but you have to build with a later SDK so we can support Android 4.x too

@alexeystrakh
Copy link

I didn't get it.
I have an app api 8+.
It works fine until the recent update to mvvmcross 3.1
Now I can build only for api 12+

How to create package to support 8+ again?

@slodge
Copy link
Contributor

slodge commented Mar 27, 2014

Android allows you to set:

  • what API Level you are compiling with
  • the min level to require
  • the target level for functionality

As long as you set your min level back to 8, and as long as you right your code so it doesn't use anything beyond 8, then your app will work.

If you need more on this, then please ask on StackOverflow or Xam forums - but by all means add a link here to that question. What you are asking is a general "Xamarin/Android how do I?" - it's not really a bug or feature request in mvx - we've worked really hard to make sure we can still work back on Android 2.x, and we're also working hard to make sure we don't suck on 4.x too :)

@alexeystrakh
Copy link

It helped. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s/needs-more-info Needs more information from the reporter
Development

No branches or pull requests

4 participants