avd - Android - I don't get the output I want -


i don't manage emulator working, shows menu screen doesn't go through screen "your total 0' , add button, substract button, i'm following tutorial:

http://www.youtube.com/watch?v=hua_isgpthi&list=ec2f07dbcdcc01493a

here screen of avd parameters:

  • avd name: brixon
  • device: 5.1 wvga(480x800:mdpi)
  • target: android 2.2 - api level 8
  • cpu/abi: arm (armeabi)
  • keyboard: checked
  • skin: checked
  • front camera: none
  • back camera: none
  • memory options: ram: 512 vm heap: 16
  • internal storage: 200 mib
  • sd card: size (nothing)

on launch options:

  • skin: 480x800
  • density: medium (160)
  • scale display real size: not checked
  • wipe user data: not checked
  • launch snapshot: checked
  • save snapshot: checked

it's code, follow strictly tutorial:

package com.grolard.newboston;  import android.os.bundle; import android.view.view; import android.widget.button; import android.widget.textview; import android.app.activity;  public class mainactivity extends activity {     /** called when activity first created. **/      int counter;     button add, sub;     textview display;      @override     protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.activity_main);         counter = 0;         add = (button) findviewbyid(r.id.badd);         sub = (button) findviewbyid(r.id.bsub);         display = (textview) findviewbyid(r.id.tvdisplay);         add.setonclicklistener(new view.onclicklistener() {              @override             public void onclick(view v) {                 // todo auto-generated method stub                 counter++;                 display.settext("your total " + counter);             }         });         sub.setonclicklistener(new view.onclicklistener() {              @override             public void onclick(view v) {                 // todo auto-generated method stub                 counter--;                 display.settext("your total " + counter);             }         });     } } 

what doing wrong?

edit:

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.grolard.newboston"     android:versioncode="1"     android:versionname="1.0" >      <uses-sdk         android:minsdkversion="8"         android:targetsdkversion="8" />      <application         android:allowbackup="true"         android:icon="@drawable/ic_launcher"         android:label="@string/app_name"         android:theme="@style/apptheme" >         <activity             android:name="com.grolard.newboston.mainactivity"             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> 

if have android device, connect usb cable , debug directly on device. emulator slow , behaves in strange way sometimes.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -