dimanche 26 octobre 2014

My application is stopped when executed. Error in my manifest?


Vote count:

0




My application is stopped when executed. I'm starting to program for android, just put a background and buttons, but it seems that I have problems creating the manifest. Before this project had many problems creating a new eclipse I put an activity together with the library and I started appcontainer_v7 errenter code hereored. To use the SDK 19 I decided to do everything manually.


CLASS:



package com.progra.cubebreaker;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

public class Menu extends Activity implements OnClickListener{

Button Jugar, Puntuaciones, Instrucciones;

@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_menu);

Jugar.findViewById(R.id.btJugar);
Puntuaciones.findViewById(R.id.btInstrucciones);
Instrucciones.findViewById(R.id.btInstrucciones);

Jugar.setOnClickListener(this);
Puntuaciones.setOnClickListener(this);
Instrucciones.setOnClickListener(this);
}

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
case R.id.btJugar:

break;
case R.id.btPuntuaciones:
Toast text = Toast.makeText(this, "Pendiente...", Toast.LENGTH_SHORT);
text.show();
break;
case R.id.btInstrucciones:
Toast text1 = Toast.makeText(this, "Pendiente...", Toast.LENGTH_SHORT);
text1.show();
break;

}

}

}


LAYOUT:



<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
android:id="@+id/RelativeLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/fondo1" >

<Button
android:id="@+id/btInstrucciones"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignRight="@+id/btPuntuaciones"
android:layout_marginBottom="89dp"
android:text="@string/instrucciones"
android:textSize="40dp"
android:textStyle="italic|normal|bold" />

<Button
android:id="@+id/btPuntuaciones"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/btInstrucciones"
android:layout_centerHorizontal="true"
android:layout_marginBottom="60dp"
android:text="@string/puntuaciones"
android:textSize="40dp"
android:textStyle="italic|normal|bold" />

<Button
android:id="@+id/btJugar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/btPuntuaciones"
android:layout_centerHorizontal="true"
android:layout_marginBottom="66dp"
android:text="@string/jugar"
android:textColorHint="@android:color/background_dark"
android:textSize="40dp"
android:textStyle="italic|normal|bold" />

</RelativeLayout>


MANIFEST:



<manifest xmlns:android="http://ift.tt/nIICcg"
package="com.progra.cubebreaker"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="19" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >

<activity
android:name=".Menu"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>

</activity>

</application>

</manifest>


asked 2 mins ago







My application is stopped when executed. Error in my manifest?

Aucun commentaire:

Enregistrer un commentaire