Error in Android Studio Button

2

being new I'm practicing in Android Studio, but I have a problem, I created a button and I want to launch a message when it is pressed, but I miss the following error in a screen that I can only put OK and does not stop exit, so I click OK but it reappears. This is the error;

Cannot reload AVD list: cvc-enumeration-valid: Value '360dpi' is not facet-valid with respect to enumeration '[ldpi, mdpi, tvdpi, hdpi, 280dpi, xhdpi, 400dpi, xxhdpi, 560dpi, xxxhdpi]'. It must be a value from the enumeration.
Error parsing C:\Users\NICOLAS\AppData\Local\Android\sdk\system-images\android-23\android-wear\armeabi-v7a\devices.xml
cvc-enumeration-valid: Value '360dpi' is not facet-valid with respect to enumeration '[ldpi, mdpi, tvdpi, hdpi, 280dpi, xhdpi, 400dpi, xxhdpi, 560dpi, xxxhdpi]'. It must be a value from the enumeration.
Error parsing C:\Users\NICOLAS\AppData\Local\Android\sdk\system-images\android-23\android-wear\x86\devices.xml
cvc-enumeration-valid: Value '360dpi' is not facet-valid with respect to enumeration '[ldpi, mdpi, tvdpi, hdpi, 280dpi, xhdpi, 400dpi, xxhdpi, 560dpi, xxxhdpi]'. It must be a value from the enumeration.
Error parsing C:\Users\NICOLAS\AppData\Local\Android\sdk\system-images\android-23\android-wear\armeabi-v7a\devices.xml
cvc-enumeration-valid: Value '360dpi' is not facet-valid with respect to enumeration '[ldpi, mdpi, tvdpi, hdpi, 280dpi, xhdpi, 400dpi, xxhdpi, 560dpi, xxxhdpi]'. It must be a value from the enumeration.
Error parsing C:\Users\NICOLAS\AppData\Local\Android\sdk\system-images\android-23\android-wear\x86\devices.xml

THIS IS MY MAIN CLASS FOR THE DOUBTS THAT NEED IT

package schmidtnicolas.mixsdeideas;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

Button botonLogin;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    botonLogin = (Button) findViewById(R.id.button);

    botonLogin.setOnClickListener(this);
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.menu_main, menu);
    return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button, so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();

    //noinspection SimplifiableIfStatement
    if (id == R.id.action_settings) {
        return true;
    }

    return super.onOptionsItemSelected(item);
}

@Override
public void onClick(View v) {

   switch (v.getId()){

       case R.id.button:
           Toast.makeText(getApplicationContext(), "Emtrando..", Toast.LENGTH_SHORT).show();
   }

}

}

Next I present the structure of my button:

 Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/editText2"
        android:paddingTop="0dp"
        android:background="@drawable/button_green"
        android:layout_alignLeft="@+id/editText2"
        android:layout_alignStart="@+id/editText2"
        android:layout_alignRight="@+id/editText2"
        android:layout_alignEnd="@+id/editText2"
        android:layout_marginTop="54dp"
        android:hint="Login"
        android:textColorHint="#97ffffff"
        android:textSize="20dp"
        android:id="@+id/button"
    
asked by Nicolas Schmidt 03.04.2016 в 07:50
source

1 answer

1

Enter the SDK Manager and remove the 2 packages shown in the image but from API 23, which are the ones that throw you the problem, if you use an AVD, you also delete it and create it again:

    
answered by 03.04.2016 / 15:55
source