Xamarin Error Build FAILED: Unsupported major.minor version 52,0

0

I'm using Xamarin Visual Studio Comunti 2015 After compiling a project, however I get the following err:

Exception in thread "main" 
1>java.lang.UnsupportedClassVersionError: com/android/dx/command/Main  :  Unsupported major.minor version 52.0
1>Build FAILED.
1>
========== Deploy: 0 succeeded, 1 failed, 0 skipped ========== 

Code

using System; 
using Android.App; 
using Android.Content; 
using Android.Runtime; 
using Android.Views; 
using Android.Widget; 
using Android.OS;


namespace Calculadora {
    [Activity(Label = "Calculadora", MainLauncher = true, Icon = "@drawable/icon")]
    public class MainActivity : Activity
    {
        EditText edtValor;
        Button btnCalcular;
        TextView txtGorjeta;
        TextView txtValorTotal;

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView (Resource.Layout.Main);

            edtValor        = FindViewById<EditText>(Resource.Id.edtValor);
            btnCalcular     = FindViewById<Button>(Resource.Id.btnCalcular);
            txtGorjeta      = FindViewById<TextView>(Resource.Id.txtGorjeta);
            txtValorTotal   = FindViewById<TextView>(Resource.Id.txtValorTotal);

            btnCalcular.Click += btnCalcular_Click;

        }


        void btnCalcular_Click(object sender,EventArgs e)
        {
            double valor = 0;
            valor = double.Parse(edtValor.Text);
            double valorTotal = 0;

            valor = valor * .10;
            valorTotal = valorTotal + valor;
            txtGorjeta.Text = valor.ToString();
            txtValorTotal.Text = valorTotal.ToString();
        }
    } }

    
asked by anonymous 17.10.2016 / 16:42

1 answer

0

This is because you are trying to use JDK 1.8, Xamarin requires JDK 1.7, at documentation they guide you to install JDK 7u79, but if you already have another version of 1.7 installed it should work as well, just change the path in the Xamarin settings

    
17.10.2016 / 18:30