viernes, 27 de junio de 2014

Download Free Help me fix unfortunately app has stopped


Hi friends.. I have mention below the logcat file ,mainactivity.Java,fragment_main.xml,manifest file... Please help me to fix this problem friends


Logcat


{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Calibri;}} {*\generator Msftedit 5.41.21.2509;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang9\f0\fs22 06-27 05:02:58.220: D/AndroidRuntime(1052): Shutting down VM\par 06-27 05:02:58.220: W/dalvikvm(1052): threadid=1: thread exiting with uncaught exception (group=0xb1a25ba8)\par 06-27 05:02:58.280: E/AndroidRuntime(1052): FATAL EXCEPTION: main\par 06-27 05:02:58.280: E/AndroidRuntime(1052): Process: com.prathee.todo, PID: 1052\par 06-27 05:02:58.280: E/AndroidRuntime(1052): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.prathee.todo/com.prathee.todo.MainActivity}: java.lang.NullPointerException\par 06-27 05:02:58.280: E/AndroidRuntime(1052): \tab at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)\par 06-27 05:02:58.280: E/AndroidRuntime(1052): \tab at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)\par 06-27 05:02:58.280: E/AndroidRuntime(1052): \tab at android.app.ActivityThread.access$800(ActivityThread.java:135)\par 06-27 05:02:58.280: E/AndroidRuntime(1052): \tab at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)\par 06-27 05:02:58.280: E/AndroidRuntime(1052): \tab at android.os.Handler.dispatchMessage(Handler.java:102)\par 06-27 05:02:58.280: E/AndroidRuntime(1052): \tab at android.os.Looper.loop(Looper.java:136)\par 06-27 05:02:58.280: E/AndroidRuntime(1052): \tab at android.app.ActivityThread.main(ActivityThread.java:5017)\par 06-27 05:02:58.280: E/AndroidRuntime(1052): \tab at java.lang.reflect.Method.invokeNative(Native Method)\par 06-27 05:02:58.280: E/AndroidRuntime(1052): \tab at java.lang.reflect.Method.invoke(Method.java:515)\par 06-27 05:02:58.280: E/AndroidRuntime(1052): \tab at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)\par 06-27 05:02:58.280: E/AndroidRuntime(1052): \tab at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)\par 06-27 05:02:58.280: E/AndroidRuntime(1052): \tab at dalvik.system.NativeStart.main(Native Method)\par 06-27 05:02:58.280: E/AndroidRuntime(1052): Caused by: java.lang.NullPointerException\par 06-27 05:02:58.280: E/AndroidRuntime(1052): \tab at com.prathee.todo.MainActivity.onCreate(MainActivity.java:33)\par 06-27 05:02:58.280: E/AndroidRuntime(1052): \tab at android.app.Activity.performCreate(Activity.java:5231)\par 06-27 05:02:58.280: E/AndroidRuntime(1052): \tab at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)\par 06-27 05:02:58.280: E/AndroidRuntime(1052): \tab at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)\par 06-27 05:02:58.280: E/AndroidRuntime(1052): \tab ... 11 more\par 06-27 05:03:05.260: I/Process(1052): Sending signal. PID: 1052 SIG: 9\par }


Mainactivity.Java


package com.prathee.todo;


import java.util.ArrayList;


import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v7.app.ActionBarActivity; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.ListView;


public class MainActivity extends ActionBarActivity {



@Override protected void onCreate(Bundle savedInstanceState) { //Get references to UI widgets ListView myListView = (ListView) findViewById(R.id.myListView); final EditText myEditText=(EditText)findViewById(R.id.myEditText); //create the array list of to do itesm final ArrayList<String>todoItems = new ArrayList<String>(); //Create the array adapter the bind the array to the list view final ArrayAdapter<String> aa; aa=new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1); //Bind The Array Adapter to the List View myListView.setAdapter(aa); //On key listener myEditText.setOnKeyListener(new View.OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { if(event.getAction() == KeyEvent.ACTION_DOWN) if((keyCode == KeyEvent.KEYCODE_DPAD_CENTER)|| (keyCode == KeyEvent.KEYCODE_ENTER)){ todoItems.add(0,myEditText.getText().toString()); aa.notifyDataSetChanged(); myEditText.setText("");; return true; } // TODO Auto-generated method stub return false; } } ); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); if (savedInstanceState == null) { getSupportFragmentManager().beginTransaction() .add(R.id.container, new PlaceholderFragment()) .commit(); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.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(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } /** * A placeholder fragment containing a simple view. */ public static class PlaceholderFragment extends Fragment { public PlaceholderFragment() { } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_main, container, false); return rootView; } }

}


Fragment_main.xml


<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context="com.prathee.todo.MainActivity$PlaceholderFragment" >



<EditText android:id="@+id/myEditText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_marginLeft="18dp" android:layout_marginTop="26dp" android:ems="10" android:hint="New To Do Items" android:inputType="textPersonName" /> <ListView android:id="@+id/myListView" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignRight="@+id/editText1" android:layout_below="@+id/editText1" > </ListView>

</LinearLayout>


Manifest file


<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.prathee.todo" android:versionCode="1" android:versionName="1.0" >



<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="19" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.prathee.todo.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>







Download link http://www.mannesoth.com/download/19/12964000/Help me fix unfortunately app has stopped

No hay comentarios:

Publicar un comentario