>
Bom dia! Eu sou iniciante em android, e não sei já mais que fazer, devido a este erro quando tento correr a aplicação, simplesmente o emulador dá me este erro "Unfortunately, Observacao has stopped" (Observacao é o nome da aplicação) e a aplicação desaparece.
ObservationActivity
package com.example.observacao;
import android.app.ListActivity;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
public class ObservationActivity extends ListActivity {
ListAdapter adapter; //permite mostrar várias informações em uma linha do ListView
DBAdapter datasource; //permite fazer operações na base de dados
Button btCTOS;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.obs);
datasource = new DBAdapter(this);
datasource.open();
Cursor cursor = datasource.getObservations();
String[] columns = new String[] { "nome","idade" };
int[] to = new int[] { R.id.nome, R.id.idade};
adapter = new SimpleCursorAdapter(
this,
R.layout.observation_list_item,
cursor,
columns,
to);
this.setListAdapter(adapter);
datasource.close();
btCTOS = (Button) findViewById(R.id.btCTOS);
btCTOS.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
//Intent novo = new Intent("com.example.observacao.Ctos");
Intent novo = new Intent(ObservationActivity.this,Ctos.class);
startActivity(novo);
}
});
}
@Override
protected void onResume() {
super.onResume();
datasource.open();
Cursor cursor = datasource.getObservations();
String[] columns = new String[] { "nome","idade" };
int[] to = new int[] { R.id.nome, R.id.idade};
adapter = new SimpleCursorAdapter(
this,
R.layout.observation_list_item,
cursor,
columns,
to);
this.setListAdapter(adapter);
datasource.close();
}
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
//Intent novo = new Intent("com.example.observacao.EditarCtos");
Intent novo = new Intent(ObservationActivity.this,EditarCtos.class);
Cursor cursor = (Cursor) adapter.getItem(position);
novo.putExtra("idObservation",cursor.getInt(cursor.getColumnIndex("_id")));
startActivity(novo);
}
}
ola Cristiana....
coloque todo o codigo.....
por favor
e o manifest.xml
Eu coloco!
Observation
package com.example.observacao;
import android.graphics.Bitmap;
/**
* Created by carlos on 29-01-2014.
*/
public class Observation {
private long _id;
private String nome; //childName
private int idade; //childAge
private String escola; //school
private String observador; //observer
private Bitmap foto;
/*public Observation() {
}*/
public Observation(long id, String nome, int idade, String escola, String observador) {
this._id=id;
this.nome = nome;
this.idade = idade;
this.escola = escola;
this.observador = observador;
}
public Observation(long id, String nome, int idade, String escola, String observador, Bitmap bmp) {
this._id=id;
this.nome = nome;
this.idade = idade;
this.escola = escola;
this.observador = observador;
this.foto = bmp;
}
public Bitmap getFoto(){
return foto;
}
public void setFoto(Bitmap btm){
this.foto= btm;
}
public long getId() {
return _id;
}
public void setId(long id) {
this._id = id;
}
public String getNome(){
return nome;
}
public void setNome(String nome){
this.nome = nome;
}
public int getIdade(){
return idade;
}
public void setIdade(int idade) {
this.idade = idade;
}
public String getEscola(){
return escola;
}
public void setEscola(String escola){
this.escola = escola;
}
public String getObservador(){
return observador;
}
public void setObservador(String observador){
this.observador = observador;
}
}
DbHelper
package com.example.observacao;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
/**
* Created by carlos on 29-01-2014.
*/
public class DbHelper extends SQLiteOpenHelper {
private static final int DATABASE_VERSION =1;
public static final String TABLE_NAME = "observation";
private static final String DATABASE_NAME = "obs.db";
public static final String ID = "_id";
public static final String NOME = "nome";
public static final String IDADE = "idade";
public static final String ESCOLA = "escola";
public static final String OBSERVADOR = "observador";
public static final String FOTO = "foto";
private static final String DATABASE_CREATE = "create table "
TABLE_NAME "( " ID
" integer primary key autoincrement, " NOME
" text not null, " IDADE " text not null, "
ESCOLA " text not null" OBSERVADOR " text not null"
", " FOTO " BLOB);";
public DbHelper(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
//super()
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL(DATABASE_CREATE);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
Log.w(DbHelper.class.getName(), "Upgrading database from version " oldVersion " to " newVersion ", which will destroy all old data");
db.execSQL("DROP TABLE IF EXISTS " TABLE_NAME);
onCreate(db);
}
}
DBAdapter
package com.example.observacao;
import java.io.ByteArrayOutputStream;
import java.util.ArrayList;
import java.util.List;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
/**
* Created by carlos on 29-01-2014.
*/
public class DBAdapter {
private SQLiteDatabase database;
private DbHelper dbHelper;
private String[] allColumns = { DbHelper.ID, DbHelper.NOME, DbHelper.IDADE, DbHelper.ESCOLA, DbHelper.OBSERVADOR, DbHelper.FOTO};
public DBAdapter(Context context) {
dbHelper = new DbHelper(context);
}
public void open() throws SQLException {
database = dbHelper.getWritableDatabase();
}
public void close() {
dbHelper.close();
}
public Observation createObservation(String nome, String idade, String escola, String observador, Bitmap foto){
ContentValues values = new ContentValues();
values.put(dbHelper.NOME, nome);
values.put(dbHelper.IDADE,idade);
values.put(dbHelper.ESCOLA,escola);
values.put(dbHelper.OBSERVADOR,observador);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
foto.compress(Bitmap.CompressFormat.PNG, 100, baos);
byte[] photo = baos.toByteArray();
values.put(dbHelper.FOTO, photo);
long insertId = database.insert(dbHelper.TABLE_NAME, null, values);
// To show how to query
Cursor cursor = database.query(dbHelper.TABLE_NAME, allColumns, dbHelper.ID " = " insertId, null,null, null, null);
cursor.moveToFirst();
return cursorToObservation(cursor);
}
public void EliminaObservation (int idObservation){
//database.delete(DB.TABLE_NAME, "id=?", new String [] {Integer.toString(idContacto)});
database.delete(DbHelper.TABLE_NAME, DbHelper.ID " = " idObservation, null);
}
private Observation cursorToObservation(Cursor cursor) {
byte[] blob = cursor.getBlob(cursor.getColumnIndex(dbHelper.FOTO));
Bitmap bmp = BitmapFactory.decodeByteArray(blob, 0, blob.length);
Observation observation = new Observation(cursor.getLong(0),cursor.getString(1), cursor.getInt(2), cursor.getString(3), cursor.getString(4),bmp);
return observation;
}
public Cursor getObservations(){
Cursor cursor = database.rawQuery("select _id, nome,idade,foto from observation", null); //escola,observador
return cursor;
}
public Observation getObservation (int idObservation){
Cursor cursor = database.query(dbHelper.TABLE_NAME, allColumns, dbHelper.ID " = " idObservation, null, null, null, null);
cursor.moveToFirst();
return cursorToObservation(cursor);
}
}
ObservationActivity
package com.example.observacao;
import android.app.ListActivity;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
public class ObservationActivity extends ListActivity {
ListAdapter adapter; //permite mostrar várias informações em uma linha do ListView
DBAdapter datasource; //permite fazer operações na base de dados
Button btCTOS;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.obs);
datasource = new DBAdapter(this);
datasource.open();
Cursor cursor = datasource.getObservations();
String[] columns = new String[] { "nome","idade" };
int[] to = new int[] { R.id.nome, R.id.idade};
adapter = new SimpleCursorAdapter(
this,
R.layout.observation_list_item,
cursor,
columns,
to);
this.setListAdapter(adapter);
datasource.close();
btCTOS = (Button) findViewById(R.id.btCTOS);
btCTOS.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
//Intent novo = new Intent("com.example.observacao.Ctos");
Intent novo = new Intent(ObservationActivity.this,Ctos.class);
startActivity(novo);
}
});
}
@Override
protected void onResume() {
super.onResume();
datasource.open();
Cursor cursor = datasource.getObservations();
String[] columns = new String[] { "nome","idade" };
int[] to = new int[] { R.id.nome, R.id.idade};
adapter = new SimpleCursorAdapter(
this,
R.layout.observation_list_item,
cursor,
columns,
to);
this.setListAdapter(adapter);
datasource.close();
}
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
//Intent novo = new Intent("com.example.observacao.EditarCtos");
Intent novo = new Intent(ObservationActivity.this,EditarCtos.class);
Cursor cursor = (Cursor) adapter.getItem(position);
novo.putExtra("idObservation",cursor.getInt(cursor.getColumnIndex("_id")));
startActivity(novo);
}
}
Ctos
package com.example.observacao;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
/**
* Created by carlos on 29-01-2014.
*/
public class Ctos extends Activity { //ActionBar
EditText edtNome;
EditText edtIdade;
EditText edtEscola;
EditText edtObservador;
ImageView iv;
Button btOK;
Button btTirarFoto;
Button btCancelar;
final static int cameraData = 0;
private DBAdapter datasource;
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.ctos);
datasource = new DBAdapter(this);
edtNome = (EditText)findViewById(R.ctos.edtNome);
edtIdade = (EditText)findViewById(R.ctos.edtIdade);
edtEscola = (EditText)findViewById(R.ctos.edtEscola);
edtObservador = (EditText)findViewById(R.ctos.edtObservador);
iv = (ImageView) findViewById(R.ctos.ivReturnedPic);
/////-/////-/////-/////
btTirarFoto = (Button) findViewById(R.ctos.tirarFoto);
btTirarFoto.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
Intent i= new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(i,cameraData);
}
});
/////-/////-/////-/////
/////-/////-/////-/////
btOK = (Button) findViewById(R.ctos.btOK);
btOK.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
datasource.open();
Observation ob = datasource.createObservation( edtNome.getText().toString(), edtIdade.getText().toString(), edtEscola.getText().toString(), edtObservador.getText().toString(), loadBitmapFromView(iv));
datasource.close();
AlertDialog.Builder dialogo = new
AlertDialog.Builder(Ctos.this);
dialogo.setTitle("Aviso");
dialogo.setMessage("Aluno:" ob.getNome());
dialogo.setNeutralButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
finish();
}
});
dialogo.show();
}
});
/////-/////-/////-/////
btCancelar = (Button) findViewById(R.ctos.btCancelar);
btCancelar.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
//finish();
Intent novo = new Intent("com.example.observacao.ObservationActivity");
startActivity(novo);
}
});
/////-/////-/////-/////
}
//quando for tirada a fotografia é apresentada a imagem no controlo imageView
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// TODO Auto-generated method stub
if(resultCode == RESULT_OK){
Bundle extras = data.getExtras();
Bitmap bmp = (Bitmap) extras.get("data");
iv.setImageBitmap(bmp);
}
super.onActivityResult(requestCode, resultCode, data);
}
public static Bitmap loadBitmapFromView (View v) {
Bitmap b = Bitmap.createBitmap( v.getLayoutParams().width, v.getLayoutParams().height, Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(b);
v.layout(0, 0, v.getLayoutParams().width, v.getLayoutParams().height);
v.draw(c);
return b;
}
}
EditarCtos
package com.example.observacao;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
/**
* Created by carlos on 29-01-2014.
*/
public class EditarCtos extends Activity { //ActionBar
int idObservation;
DBAdapter datasource;
Observation observation;
TextView edtNome;
TextView edtIdade;
TextView edtEscola;
TextView edtObservador;
Button btVoltar;
Button btEliminar;
ImageView ivFoto;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.editarctos);
edtNome = (TextView) findViewById(R.lista.txtnome);
edtIdade = (TextView) findViewById(R.lista.txtidade);
edtEscola = (TextView) findViewById(R.lista.txtescola);
edtObservador = (TextView) findViewById(R.lista.txtobservador);
ivFoto = (ImageView) findViewById(R.id.ivFoto);
btEliminar = (Button) findViewById(R.id.btEliminar);
btVoltar = (Button) findViewById(R.id.btVoltar);
carregaEditarCtos();
/////-/////-/////-/////
btVoltar.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
finish();
}
});
/////-/////-/////-/////
btEliminar.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
AlertDialog.Builder dialogo = new AlertDialog.Builder(EditarCtos.this);
dialogo.setTitle("Aviso");
dialogo.setMessage("Eliminar Aluno?");
dialogo.setNegativeButton("Cancelar", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
}
});
dialogo.setPositiveButton("Eliminar",new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
datasource.open();
datasource.EliminaObservation(idObservation);
datasource.close();
finish();
}
});
dialogo.show();
}
});
/////-/////-/////-/////
}
private void carregaEditarCtos(){
idObservation = getIntent().getIntExtra("idObservation", 0);
datasource = new DBAdapter(this);
datasource.open();
observation = datasource.getObservation(idObservation);
datasource.close();
ivFoto.setImageBitmap(observation.getFoto());
edtNome.setText(observation.getNome());
edtIdade.setText(observation.getIdade());
edtEscola.setText(observation.getEscola());
edtObservador.setText(observation.getObservador());
}
}
obs.xml
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@android:drawable/alert_light_frame" >
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="center_horizontal">
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/txtObservações"
android:textAppearance="@android:style/TextAppearance.Large" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@ id/btAdd"
android:background="@android:drawable/ic_menu_add" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="center_horizontal"
android:textAlignment="@integer/abc_max_action_buttons">
android:id="@ id/btCTOS"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:onClick="btCTOS_click"
android:text="@string/btCTOS"
android:layout_gravity="center_horizontal" />
android:id="@ id/btAES"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:onClick="btAES_click"
android:text="@string/btAES"
android:layout_gravity="center_horizontal" />
android:id="@ id/btCIS"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:onClick="btCIS_click"
android:text="@string/btCIS"
android:layout_gravity="center_horizontal" />
android:id="@ id/btSync"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:onClick="btSync_click"
android:text="@string/btSYNC"
android:layout_gravity="center_horizontal" />
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
android:id="@ android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
ctos.xml
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@android:drawable/alert_light_frame"
android:baselineAligned="false">
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@ id/scrollView">
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
android:id="@ ctos/edtNome"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text="@string/edtNome" >
android:id="@ ctos/edtIdade"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="number"
android:text="@string/edtIdade">
android:id="@ ctos/edtEscola"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="none"
android:text="@string/edtEscola" >
android:id="@ ctos/edtObservador"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text="@string/edtObservador" />
android:id="@ id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center">
android:id="@ ctos/tirarFoto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="tirar fotografia" />
android:id="@ ctos/btOK"
android:onClick="btOK_Click"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btOK" />
android:id="@ ctos/btCancelar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btCancelar"
android:onClick="btCancelar_click"/>
android:id="@ ctos/ivReturnedPic"
android:layout_width="250dp"
android:layout_height="250dp"
android:layout_gravity="center"
android:src="@drawable/ic_launcher" />
observation_list_item.xml
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="8px">
android:id="@ id/nome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="Large Text"
android:textAppearance="?android:attr/textAppearanceLarge" />
android:id="@ id/idade"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@ id/nome"
android:layout_below="@ id/nome"
android:text="Large Text"
android:textAppearance="?android:attr/textAppearanceLarge" />
AndroidManifest.xml
package="com.example.observacao"
android:versionCode="1"
android:versionName="1.0" >
android:minSdkVersion="7"
android:targetSdkVersion="19" />
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:label="@string/app_name"
android:name=".ObservationActivity" >
android:label="@string/app_name"
android:name=".Ctos" >
android:label="@string/app_name"
android:name=".EditarCtos" >
strings.xml
Observacao
Hello world!
Settings
Observações
CTOS
AES
CIS
SYNC
Escola
Data Nascimento
Nome
Idade
Sexo
Masculino
Feminino
Educação especial
Observador
Data
Hora
OK
Cancelar
Voltar
Editar
Eliminar
por favor agradeço sugestões!
por favor , vc pode me dar o logcat do erro tbm...
02-05 08:43:24.033 40-40/? E/cutils%uFE55 Failed to read /data/.layout_version: No such file or directory
02-05 08:43:26.412 36-69/? E/SurfaceFlinger%uFE55 hwcomposer module not found
02-05 08:43:26.412 36-69/? E/cutils-trace%uFE55 Error opening trace file: No such file or directory (2)
02-05 08:43:27.542 36-36/? E/SurfaceFlinger%uFE55 ro.sf.lcd_density must be defined as a build property
02-05 08:43:27.862 80-92/? E/cutils-trace%uFE55 Error opening trace file: No such file or directory (2)
02-05 08:43:34.532 37-37/? E/cutils-trace%uFE55 Error opening trace file: No such file or directory (2)
02-05 08:43:38.502 245-245/? E/logwrapper%uFE55 executing /system/bin/ip failed: No such file or directory
02-05 08:43:38.553 246-246/? E/logwrapper%uFE55 executing /system/bin/ip failed: No such file or directory
02-05 08:43:38.592 247-247/? E/logwrapper%uFE55 executing /system/bin/ip failed: No such file or directory
02-05 08:43:38.653 248-248/? E/logwrapper%uFE55 executing /system/bin/ip failed: No such file or directory
02-05 08:43:38.692 249-249/? E/logwrapper%uFE55 executing /system/bin/ip failed: No such file or directory
02-05 08:43:38.732 250-250/? E/logwrapper%uFE55 executing /system/bin/ip failed: No such file or directory
02-05 08:43:38.812 251-251/? E/logwrapper%uFE55 executing /system/bin/ip failed: No such file or directory
02-05 08:43:42.104 33-33/? E/BandwidthController%uFE55 runIptablesCmd(): res=1 status=256 failed /system/bin/iptables -A bw_INPUT -m owner --socket-exists
02-05 08:43:42.203 33-33/? E/BandwidthController%uFE55 runIptablesCmd(): res=1 status=256 failed /system/bin/ip6tables -A bw_INPUT -m owner --socket-exists
02-05 08:43:42.223 33-33/? E/Netd%uFE55 Unable to bind netlink socket: No such file or directory
02-05 08:43:42.223 33-33/? E/Netd%uFE55 Unable to open quota2 logging socket
02-05 08:44:25.002 297-319/? E/PowerManagerService-JNI%uFE55 Couldn't load power module (No such file or directory)
02-05 08:44:26.272 314-314/? E/cutils-trace%uFE55 Error opening trace file: No such file or directory (2)
02-05 08:44:26.454 317-317/? E/cutils-trace%uFE55 Error opening trace file: No such file or directory (2)
02-05 08:44:29.402 36-296/? E/SurfaceFlinger%uFE55 ro.sf.lcd_density must be defined as a build property
02-05 08:48:21.874 297-320/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/Lock.ogg
02-05 08:48:21.913 297-320/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/Unlock.ogg
02-05 08:48:23.703 297-356/system_process E/EventHub%uFE55 could not get driver version for /dev/input/mouse0, Not a typewriter
02-05 08:48:23.703 297-356/system_process E/EventHub%uFE55 could not get driver version for /dev/input/mice, Not a typewriter
02-05 08:48:28.834 297-319/system_process E/MobileDataStateTracker%uFE55 default: Ignoring feature request because could not acquire PhoneService
02-05 08:48:28.834 297-319/system_process E/MobileDataStateTracker%uFE55 default: Could not enable APN type "default"
02-05 08:48:33.772 297-319/system_process E/SQLiteLog%uFE55 (1) no such table: locksettings
02-05 08:48:51.333 297-297/system_process E/ActivityManager%uFE55 Attempt to launch receivers of broadcast intent Intent { act=android.provider.Contacts.DATABASE_CREATED } before boot completion
02-05 08:48:51.393 297-297/system_process E/ActivityManager%uFE55 Activity Manager Crash
java.lang.IllegalStateException: Cannot broadcast before boot completed
at com.android.server.am.ActivityManagerService.verifyBroadcastLocked(ActivityManagerService.java:12262)
at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:12280)
at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:351)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:1737)
at android.os.Binder.execTransact(Binder.java:388)
at com.android.server.SystemServer.init1(Native Method)
at com.android.server.SystemServer.main(SystemServer.java:1066)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
02-05 08:48:51.623 398-398/android.process.acore A/ContactsUpgradeReceiver%uFE55 Error during upgrade attempt. Disabling receiver.
java.lang.IllegalStateException: Cannot broadcast before boot completed
at android.os.Parcel.readException(Parcel.java:1439)
at android.os.Parcel.readException(Parcel.java:1385)
at android.app.ActivityManagerProxy.broadcastIntent(ActivityManagerNative.java:2224)
at android.app.ContextImpl.sendBroadcast(ContextImpl.java:1060)
at android.content.ContextWrapper.sendBroadcast(ContextWrapper.java:349)
at android.content.ContextWrapper.sendBroadcast(ContextWrapper.java:349)
at com.android.providers.contacts.ContactsDatabaseHelper.onCreate(ContactsDatabaseHelper.java:1350)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:252)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:164)
at com.android.providers.contacts.ContactsUpgradeReceiver.onReceive(ContactsUpgradeReceiver.java:84)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2424)
at android.app.ActivityThread.access$1500(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1332)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
02-05 08:49:00.452 297-322/system_process E/LocationManagerService%uFE55 no geocoder provider found
02-05 08:49:00.532 297-322/system_process E/LocationManagerService%uFE55 no geofence provider found
02-05 08:49:11.873 487-487/com.android.settings E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 08:49:15.503 475-475/com.android.phone E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 08:49:17.373 432-432/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 08:49:17.373 432-432/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 08:49:17.473 475-475/com.android.phone E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 08:49:20.426 432-432/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 08:49:21.107 297-319/system_process E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 08:49:21.122 297-319/system_process E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 08:49:21.502 297-377/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/Effect_Tick.ogg
02-05 08:49:21.612 297-377/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/Effect_Tick.ogg
02-05 08:49:21.662 297-377/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/Effect_Tick.ogg
02-05 08:49:21.842 297-377/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/Effect_Tick.ogg
02-05 08:49:22.012 297-377/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/Effect_Tick.ogg
02-05 08:49:22.022 297-377/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/KeypressStandard.ogg
02-05 08:49:22.032 297-377/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/KeypressSpacebar.ogg
02-05 08:49:22.072 297-377/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/KeypressDelete.ogg
02-05 08:49:22.162 297-377/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/KeypressReturn.ogg
02-05 08:49:29.156 432-432/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 08:49:34.812 297-322/system_process E/ActivityManager%uFE55 ANR in com.android.systemui
Reason: Executing service com.android.systemui/.SystemUIService
Load: 5.54 / 2.63 / 1.14
CPU usage from 2375ms to -17216ms ago:
44% 36/surfaceflinger: 41% user 3.1% kernel / faults: 298 minor
19% 297/system_server: 13% user 5.8% kernel / faults: 1521 minor 2 major
6.9% 80/bootanimation: 6.3% user 0.6% kernel
6.7% 528/android.process.acore: 3.7% user 2.9% kernel / faults: 3975 minor 2 major
6.3% 432/com.android.systemui: 5.4% user 0.9% kernel / faults: 891 minor 2 major
5.1% 475/com.android.phone: 2.9% user 2.1% kernel / faults: 1696 minor 6 major
1.7% 46/adbd: 0.4% user 1.2% kernel
0.5% 229/logcat: 0.3% user 0.1% kernel
0.3% 30/servicemanager: 0% user 0.2% kernel
0.3% 231/logcat: 0.1% user 0.2% kernel
0.2% 458/com.android.inputmethod.latin: 0.1% user 0.1% kernel / faults: 73 minor
0.2% 487/com.android.settings: 0.1% user 0.1% kernel / faults: 15 minor
0.1% 39/mediaserver: 0.1% user 0% kernel / faults: 8 minor
0.1% 35/rild: 0% user 0% kernel / faults: 3 minor
0% 1//init: 0% user 0% kernel / faults: 22 minor
0% 37/zygote: 0% user 0% kernel / faults: 48 minor
0% 548/com.android.launcher: 0% user 0% kernel
99% TOTAL: 80% user 19% kernel 0% irq 0.3% softirq
CPU usage from 13497ms to 14874ms later:
43% 36/surfaceflinger: 40% user 2.9% kernel / faults: 22 minor
41% 69/SurfaceFlinger: 38% user 2.2% kernel
0.7% 36/Binder_2: 0% user 0.7% kernel
0.7% 76/VSyncThread: 0.7% user 0% kernel
0.7% 78/EventThread: 0.7% user 0% kernel
0.7% 79/Binder_1: 0% user 0.7% kernel
0.7% 143/Binder_3: 0% user 0.7% kernel
0.7% 296/Binder_4: 0% user 0.7% kernel
8.5% 432/com.android.systemui: 4.4% user 4% kernel / faults: 180 minor
8.1% 432/ndroid.systemui: 5.2% user 2.8% kernel
2% 442/Compiler: 2% user 0% kernel
1.2% 436/GC: 0% user 1.2% kernel
7.8% 475/com.android.phone: 5.7% user 2% kernel / faults: 180 minor 2 major
5.3% 475/m.android.phone: 3.7% user 1.6% kernel
2.8% 483/Compiler: 2% user 0.8% kernel
13% 297/system_server: 8% user 5.1% kernel / faults: 65 minor
7.2% 322/ActivityManager: 5.1% user 2.1% kernel
1.4% 304/Compiler: 0.7% user 0.7% kernel
1.4% 420/Binder_3: 1.4% user 0% kernel
1.4% 429/Binder_4: 1.4% user 0% kernel
0.7% 350/PowerManagerSer: 0.7% user 0% kernel
0.7% 507/Binder_5: 0.7% user 0% kernel
0.7% 545/Binder_8: 0% user 0.7% kernel
0.7% 559/Thread-77: 0% user 0.7% kernel
6.9% 528/android.process.acore: 5.2% user 1.6% kernel / faults: 711 minor
3.2% 528/d.process.acore: 3.2% user 0% kernel
1.2% 540/Binder_1: 0.8% user 0.4% kernel
0.4% 541/Binder_2: 0% user 0.4% kernel
0.4% 568/ApplicationsPro: 0.4% user 0% kernel
0.4% 575/ContactsProvide: 0% user 0.4% kernel
6.5% 548/com.android.launcher: 6.5% user 0% kernel / faults: 111 minor
6.9% 548/ndroid.launcher: 6.9% user 0% kernel
7.4% 80/bootanimation: 7.4% user 0% kernel
7.4% 92/BootAnimation: 7.4% user 0% kernel
1.5% 231/logcat: 0% user 1.5% kernel
0.7% 30/servicemanager: 0% user 0.7% kernel
0.7% 46/adbd: 0% user 0.7% kernel
0.7% 46/adbd: 0% user 0.7% kernel
0.7% 213/adbd: 0% user 0.7% kernel
0.7% 229/logcat: 0.7% user 0% kernel
100% TOTAL: 81% user 17% kernel 0.7% irq
02-05 08:49:36.722 487-487/com.android.settings E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 08:49:42.322 35-63/? A/libc%uFE55 Fatal signal 11 (SIGSEGV) at 0x00000001 (code=1), thread 63 (rild)
02-05 03:49:55.302 591-591/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 03:49:55.322 591-591/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 03:49:55.422 591-591/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 03:49:57.032 591-591/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 03:49:59.682 591-591/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 03:50:18.577 487-487/com.android.settings E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 03:50:25.838 711-724/com.android.email E/SQLiteLog%uFE55 (1) no such table: Account
02-05 03:50:30.438 651-728/android.process.media E/SQLiteLog%uFE55 (1) no such table: files
02-05 03:50:31.238 39-118/? E/WVMExtractor%uFE55 Failed to open libwvm.so
02-05 03:50:32.548 39-830/? E/MetadataRetrieverClient%uFE55 failed to extract an album art
02-05 03:50:37.650 651-728/android.process.media E/SQLiteLog%uFE55 (1) no such table: album_info
02-05 03:57:41.981 297-377/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/Effect_Tick.ogg
02-05 03:57:41.988 297-377/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/Effect_Tick.ogg
02-05 03:57:41.988 297-377/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/Effect_Tick.ogg
02-05 03:57:42.001 297-377/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/Effect_Tick.ogg
02-05 03:57:42.008 297-377/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/Effect_Tick.ogg
02-05 03:57:42.008 297-377/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/KeypressStandard.ogg
02-05 03:57:42.021 297-377/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/KeypressSpacebar.ogg
02-05 03:57:42.028 297-377/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/KeypressDelete.ogg
02-05 03:57:42.028 297-377/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/KeypressReturn.ogg
02-05 03:58:18.168 846-846/? E/cutils-trace%uFE55 Error opening trace file: No such file or directory (2)
02-05 03:58:31.967 886-886/? E/cutils-trace%uFE55 Error opening trace file: No such file or directory (2)
02-05 03:58:37.578 896-896/com.example.observacao E/SQLiteLog%uFE55 (1) near "nullobservador": syntax error
02-05 03:58:37.638 896-896/com.example.observacao E/AndroidRuntime%uFE55 FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.observacao/com.example.observacao.ObservationActivity}: android.database.sqlite.SQLiteException: near "nullobservador": syntax error (code 1): , while compiling: create table observation( _id integer primary key autoincrement, nome text not null, idade text not null, escola text not nullobservador text not null, foto BLOB);
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.database.sqlite.SQLiteException: near "nullobservador": syntax error (code 1): , while compiling: create table observation( _id integer primary key autoincrement, nome text not null, idade text not null, escola text not nullobservador text not null, foto BLOB);
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:58)
at android.database.sqlite.SQLiteStatement.(SQLiteStatement.java:31)
at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1672)
at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1603)
at com.example.observacao.DbHelper.onCreate(DbHelper.java:39)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:252)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:164)
at com.example.observacao.DBAdapter.open(DBAdapter.java:31)
at com.example.observacao.ObservationActivity.onCreate(ObservationActivity.java:27)
at android.app.Activity.performCreate(Activity.java:5133)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Peço desculpa em dividir em várias partes mas de outra forma não conseguia enviar! não sei se é ignorância minha ou se realmente não dá mesmo!
Mas obrigado pela disponibilidade.
ola Cristiana
ali no Dbhelper tem um erro de sql
la em ESCOLA "text not null"
vc se eskeceu de colocar uma ","
Sim realmente faltava la umas virgulas!
Mas infelizmente o emulador continua a dar o mesmo erro...
passe agora qual é o logcat...
02-05 06:35:32.760 37-68/? E/SurfaceFlinger%uFE55 hwcomposer module not found
02-05 06:35:32.944 37-68/? E/cutils-trace%uFE55 Error opening trace file: No such file or directory (2)
02-05 06:35:37.032 37-37/? E/SurfaceFlinger%uFE55 ro.sf.lcd_density must be defined as a build property
02-05 06:35:37.880 79-93/? E/cutils-trace%uFE55 Error opening trace file: No such file or directory (2)
02-05 06:35:57.491 38-38/? E/cutils-trace%uFE55 Error opening trace file: No such file or directory (2)
02-05 06:36:02.601 244-244/? E/logwrapper%uFE55 executing /system/bin/ip failed: No such file or directory
02-05 06:36:02.780 245-245/? E/logwrapper%uFE55 executing /system/bin/ip failed: No such file or directory
02-05 06:36:02.880 246-246/? E/logwrapper%uFE55 executing /system/bin/ip failed: No such file or directory
02-05 06:36:03.020 247-247/? E/logwrapper%uFE55 executing /system/bin/ip failed: No such file or directory
02-05 06:36:03.170 248-248/? E/logwrapper%uFE55 executing /system/bin/ip failed: No such file or directory
02-05 06:36:03.364 249-249/? E/logwrapper%uFE55 executing /system/bin/ip failed: No such file or directory
02-05 06:36:03.600 250-250/? E/logwrapper%uFE55 executing /system/bin/ip failed: No such file or directory
02-05 06:36:08.630 219-219/? E/cutils-trace%uFE55 Error opening trace file: No such file or directory (2)
02-05 06:36:12.490 34-34/? E/BandwidthController%uFE55 runIptablesCmd(): res=1 status=256 failed /system/bin/iptables -A bw_INPUT -m owner --socket-exists
02-05 06:36:12.790 34-34/? E/BandwidthController%uFE55 runIptablesCmd(): res=1 status=256 failed /system/bin/ip6tables -A bw_INPUT -m owner --socket-exists
02-05 06:36:12.833 34-34/? E/Netd%uFE55 Unable to bind netlink socket: No such file or directory
02-05 06:36:12.833 34-34/? E/Netd%uFE55 Unable to open quota2 logging socket
02-05 06:37:52.600 304-318/? E/PowerManagerService-JNI%uFE55 Couldn't load power module (No such file or directory)
02-05 06:37:57.115 37-78/? E/SurfaceFlinger%uFE55 ro.sf.lcd_density must be defined as a build property
02-05 06:39:23.740 304-319/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/Lock.ogg
02-05 06:39:23.827 304-319/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/Unlock.ogg
02-05 06:39:26.658 304-337/system_process E/EventHub%uFE55 could not get driver version for /dev/input/mouse0, Not a typewriter
02-05 06:39:26.661 304-337/system_process E/EventHub%uFE55 could not get driver version for /dev/input/mice, Not a typewriter
02-05 06:39:41.020 304-318/system_process E/MobileDataStateTracker%uFE55 default: Ignoring feature request because could not acquire PhoneService
02-05 06:39:41.020 304-318/system_process E/MobileDataStateTracker%uFE55 default: Could not enable APN type "default"
02-05 06:40:04.743 304-318/system_process E/NetdConnector%uFE55 NDC Command {1 firewall disable} took too long (3550ms)
02-05 06:40:06.090 304-318/system_process E/NetdConnector%uFE55 NDC Command {2 firewall disable} took too long (1110ms)
02-05 06:40:10.230 304-338/system_process E/VoldConnector%uFE55 NDC Command {3 volume mount /storage/sdcard} took too long (9379ms)
02-05 06:40:13.820 304-325/system_process E/VoldConnector%uFE55 NDC Command {4 asec list} took too long (6330ms)
02-05 06:40:18.316 304-318/system_process E/LocationManagerService%uFE55 no geocoder provider found
02-05 06:40:18.661 304-318/system_process E/LocationManagerService%uFE55 no geofence provider found
02-05 06:41:31.233 366-366/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:41:31.233 366-366/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:41:34.560 366-366/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:41:48.271 304-318/system_process E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:41:48.424 410-410/com.android.phone E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:41:48.501 304-358/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/Effect_Tick.ogg
02-05 06:41:48.511 304-358/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/Effect_Tick.ogg
02-05 06:41:48.531 304-358/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/Effect_Tick.ogg
02-05 06:41:48.543 304-358/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/Effect_Tick.ogg
02-05 06:41:50.383 304-358/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/Effect_Tick.ogg
02-05 06:41:50.391 304-358/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/KeypressStandard.ogg
02-05 06:41:50.411 304-358/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/KeypressSpacebar.ogg
02-05 06:41:50.551 304-318/system_process E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:41:50.632 304-358/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/KeypressDelete.ogg
02-05 06:41:51.764 304-358/system_process E/SoundPool%uFE55 error loading /system/media/audio/ui/KeypressReturn.ogg
02-05 06:41:52.361 366-366/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:41:53.021 410-410/com.android.phone E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:42:01.230 501-501/com.android.settings E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:42:02.670 304-321/system_process E/ActivityManager%uFE55 ANR in com.android.systemui
Reason: Executing service com.android.systemui/.ImageWallpaper
Load: 6.24 / 3.58 / 1.63
CPU usage from 0ms to 42851ms later:
31% 37/surfaceflinger: 29% user 2.8% kernel / faults: 1216 minor
26% 304/system_server: 18% user 7.4% kernel / faults: 4441 minor 1 major
7.2% 423/com.android.launcher: 5.6% user 1.5% kernel / faults: 2212 minor 5 major
4.6% 366/com.android.systemui: 3.5% user 1% kernel / faults: 959 minor 1 major
4% 410/com.android.phone: 2.3% user 1.7% kernel / faults: 1479 minor 7 major
2.4% 47/adbd: 0.4% user 2% kernel
1.1% 395/com.android.inputmethod.latin: 0.8% user 0.3% kernel / faults: 944 minor 9 major
0.5% 190/logcat: 0.1% user 0.4% kernel
0.4% 187/logcat: 0.1% user 0.3% kernel
0.1% 40/mediaserver: 0% user 0% kernel / faults: 11 minor
0.1% 38/zygote: 0% user 0% kernel / faults: 147 minor
0% 31/servicemanager: 0% user 0% kernel / faults: 6 minor
0% 1//init: 0% user 0% kernel / faults: 4 minor
0% 36/rild: 0% user 0% kernel / faults: 3 minor
0% 12/pdflush: 0% user 0% kernel
0% 454/android.process.media: 0% user 0% kernel
0% 476/android.process.acore: 0% user 0% kernel
0% 501/com.android.settings: 0% user 0% kernel
99% TOTAL: 75% user 23% kernel 0.3% irq 0.6% softirq
CPU usage from 37075ms to 38956ms later:
37% 476/android.process.acore: 22% user 15% kernel / faults: 1729 minor 3 major
23% 476/d.process.acore: 14% user 9% kernel
10% 483/Compiler: 6.7% user 3.8% kernel
3.3% 480/GC: 0.2% user 3.1% kernel
0% 516/ApplicationsPro: 0% user 0% kernel
0% 517/PackageMonitor: 0% user 0% kernel
0% 522/ContactsProvide: 0% user 0% kernel
28% 304/system_server: 18% user 10% kernel / faults: 1148 minor
18% 319/UI: 12% user 5.5% kernel
7.8% 321/ActivityManager: 5.5% user 2.3% kernel
4.1% 311/Compiler: 1.8% user 2.3% kernel
2.7% 496/Binder_8: 2.3% user 0.4% kernel
1.3% 304/system_server: 1.3% user 0% kernel
1.3% 442/Binder_4: 0.4% user 0.9% kernel
1.3% 447/Binder_6: 1.3% user 0% kernel
0.9% 318/er.ServerThread: 0.9% user 0% kernel
0.9% 438/Binder_3: 0.4% user 0.4% kernel
0.9% 448/Binder_7: 0.9% user 0% kernel
0.4% 315/Binder_1: 0% user 0.4% kernel
0.4% 469/Thread-72: 0.4% user 0% kernel
0% 519/Binder_9: 0% user 0% kernel
9.4% 423/com.android.launcher: 7.2% user 2.2% kernel / faults: 182 minor
6.4% 423/ndroid.launcher: 5.9% user 0.4% kernel
2.2% 430/Compiler: 0.9% user 1.2% kernel
3.1% 454/android.process.media: 2.1% user 0.9% kernel / faults: 60 minor
0.7% 454/d.process.media: 0.7% user 0% kernel
0.7% 499/Thread-33: 0.4% user 0.2% kernel
0.4% 461/Compiler: 0.2% user 0.2% kernel
0.4% 500/DownloadManager: 0.4% user 0% kernel
0% 507/MediaScannerSer: 0% user 0% kernel
4.6% 47/adbd: 0.4% user 4.1% kernel
2.3% 47/adbd: 0% user 2.3% kernel
1.8% 185/adbd: 0.9% user 0.9% kernel
0.9% 186/adbd: 0.4% user 0.4% kernel
2.5% 410/com.android.phone: 2% user 0.5% kernel / faults: 355 minor
1.7% 410/m.android.phone: 1.5% user 0.2% kernel
0.5% 417/Compiler: 0.5% user 0% kernel
0.2% 435/Binder_2: 0.2% user 0% kernel
0.2% 487/AsyncTask #1: 0.2% user 0% kernel
0% 513/Binder_4: 0% user 0% kernel
2.1% 366/com.android.systemui: 1.2% user 0.9% kernel / faults: 87 minor
2.8% 366/ndroid.systemui: 1.6% user 1.2% kernel
0.7% 370/GC: 0.2% user 0.4% kernel
0.2% 374/Compiler: 0.2% user 0% kernel
0.2% 491/AsyncTask #1: 0% user 0.2% kernel
2.3% 190/logcat: 0.9% user 1.3% kernel
1.4% 38/zygote: 0.4% user 0.9% kernel / faults: 49 minor
0.4% 38/zygote: 0% user 0.4% kernel
0% 502/ReferenceQueueD: 0% user 0% kernel
0% 503/FinalizerDaemon: 0% user 0% kernel
0% 504/FinalizerWatchd: 0% user 0% kernel
0% 501/com.android.settings: 0% user 0% kernel
100% TOTAL: 61% user 37% kernel 0.5% softirq
02-05 06:42:05.710 304-336/system_process E/InputDispatcher%uFE55 channel '4198a320 StatusBar (server)' ~ Channel is unrecoverably broken and will be disposed!
02-05 06:42:05.730 304-336/system_process E/InputDispatcher%uFE55 channel '41a64610 SearchPanel (server)' ~ Channel is unrecoverably broken and will be disposed!
02-05 06:42:05.744 304-336/system_process E/InputDispatcher%uFE55 channel '4199d0c8 NavigationBar (server)' ~ Channel is unrecoverably broken and will be disposed!
02-05 06:42:17.881 36-58/? A/libc%uFE55 Fatal signal 11 (SIGSEGV) at 0x00000001 (code=1), thread 58 (rild)
02-05 06:42:24.550 532-532/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:42:24.620 532-532/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:42:25.610 532-532/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:42:34.330 532-532/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:42:45.431 532-532/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:42:46.061 304-321/system_process E/ActivityManager%uFE55 ANR in com.android.systemui
Reason: Executing service com.android.systemui/.SystemUIService
Load: 12.28 / 5.46 / 2.35
CPU usage from 0ms to 16626ms later:
50% 304/system_server: 38% user 11% kernel / faults: 1024 minor
12% 410/com.android.phone: 7.7% user 4.5% kernel / faults: 764 minor
11% 532/com.android.systemui: 9.2% user 2.6% kernel / faults: 813 minor 2 major
6% 37/surfaceflinger: 5.7% user 0.3% kernel / faults: 13 minor
3.1% 47/adbd: 0.2% user 2.9% kernel
0.6% 476/android.process.acore: 0.5% user 0.1% kernel / faults: 55 minor 1 major
0.6% 578/com.android.exchange: 0.3% user 0.3% kernel / faults: 104 minor
0.5% 1//init: 0% user 0.5% kernel / faults: 15 minor
0.4% 190/logcat: 0.3% user 0.1% kernel
0.4% 454/android.process.media: 0.3% user 0.1% kernel / faults: 61 minor
0.3% 31/servicemanager: 0% user 0.2% kernel
0.3% 38/zygote: 0% user 0.3% kernel / faults: 51 minor
0.2% 395/com.android.inputmethod.latin: 0% user 0.1% kernel / faults: 6 minor
0.3% 551/com.android.calendar: 0.1% user 0.1% kernel / faults: 60 minor
0.2% 187/logcat: 0% user 0.1% kernel
0.1% 565/rild: 0% user 0.1% kernel
0% 29/mmcqd: 0% user 0% kernel
0% 501/com.android.settings: 0% user 0% kernel / faults: 2 minor
0% 598/com.android.email: 0% user 0% kernel
100% TOTAL: 71% user 27% kernel 0.1% irq 0.8% softirq
CPU usage from 12211ms to 14257ms later:
58% 304/system_server: 45% user 13% kernel / faults: 161 minor
19% 319/UI: 18% user 1.5% kernel
13% 321/ActivityManager: 5.6% user 7.7% kernel
4.6% 318/er.ServerThread: 3% user 1.5% kernel
3.6% 531/Binder_C: 3% user 0.5% kernel
3% 311/Compiler: 1.5% user 1.5% kernel
0.5% 304/system_server: 0.5% user 0% kernel
0.5% 313/FinalizerDaemon: 0% user 0.5% kernel
0.5% 316/Binder_2: 0.5% user 0% kernel
0.5% 438/Binder_3: 0.5% user 0% kernel
0.5% 442/Binder_4: 0.5% user 0% kernel
0.5% 447/Binder_6: 0.5% user 0% kernel
0.5% 496/Binder_8: 0.5% user 0% kernel
0.5% 524/Binder_B: 0.5% user 0% kernel
23% 532/com.android.systemui: 20% user 3.6% kernel / faults: 140 minor
15% 532/ndroid.systemui: 14% user 1.2% kernel
3% 539/Compiler: 2.4% user 0.6% kernel
0.6% 536/GC: 0% user 0.6% kernel
0.6% 541/FinalizerDaemon: 0% user 0.6% kernel
20% 410/com.android.phone: 14% user 6.7% kernel / faults: 110 minor
11% 410/m.android.phone: 8.4% user 3.3% kernel
4.5% 414/GC: 1.1% user 3.3% kernel
3.3% 417/Compiler: 2.8% user 0.5% kernel
1.1% 435/Binder_2: 0.5% user 0.5% kernel
1.1% 513/Binder_4: 1.1% user 0% kernel
0.5% 498/Binder_3: 0% user 0.5% kernel
1% 31/servicemanager: 0% user 1% kernel
1% 476/android.process.acore: 0.5% user 0.5% kernel / faults: 6 minor
0.5% 476/d.process.acore: 0% user 0.5% kernel
0.5% 483/Compiler: 0.5% user 0% kernel
0.5% 516/ApplicationsPro: 0% user 0.5% kernel
0.5% 454/android.process.media: 0% user 0.5% kernel / faults: 5 minor
0.5% 454/d.process.media: 0% user 0.5% kernel
0.1% 551/com.android.calendar: 0% user 0.1% kernel / faults: 6 minor
0.5% 578/com.android.exchange: 0.5% user 0% kernel / faults: 1 minor
100% TOTAL: 74% user 25% kernel
02-05 06:42:56.770 476-476/android.process.acore A/libc%uFE55 Fatal signal 16 (SIGSTKFLT) at 0x000001dc (code=-6), thread 476 (d.process.acore)
02-05 06:42:58.710 304-321/system_process E/JavaBinder%uFE55 !!! FAILED BINDER TRANSACTION !!!
02-05 06:43:01.035 304-365/system_process E/NativeCrashListener%uFE55 Exception dealing with report
libcore.io.ErrnoException: read failed: EAGAIN (Try again)
at libcore.io.Posix.readBytes(Native Method)
at libcore.io.Posix.read(Posix.java:127)
at libcore.io.BlockGuardOs.read(BlockGuardOs.java:149)
at com.android.server.am.NativeCrashListener.consumeNativeCrashData(NativeCrashListener.java:233)
at com.android.server.am.NativeCrashListener.run(NativeCrashListener.java:138)
02-05 06:43:02.733 304-336/system_process E/InputDispatcher%uFE55 channel '41abecc0 SearchPanel (server)' ~ Channel is unrecoverably broken and will be disposed!
02-05 06:43:02.910 304-336/system_process E/InputDispatcher%uFE55 channel '4199b340 com.android.systemui.ImageWallpaper (server)' ~ Channel is unrecoverably broken and will be disposed!
02-05 06:43:09.141 633-633/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:43:09.151 633-633/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:43:09.391 633-633/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:43:10.401 633-633/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:43:16.990 633-633/com.android.systemui E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:43:37.081 501-501/com.android.settings E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:43:38.361 501-501/com.android.settings E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:43:38.891 501-501/com.android.settings E/BluetoothAdapter%uFE55 Bluetooth binder is null
02-05 06:43:38.453 598-617/com.android.email E/SQLiteLog%uFE55 (1) no such table: Account
02-05 06:47:15.804 777-777/? E/cutils-trace%uFE55 Error opening trace file: No such file or directory (2)
02-05 06:47:38.664 846-855/? E/cutils-trace%uFE55 Error opening trace file: No such file or directory (2)
02-05 06:47:45.515 859-859/com.example.observacao E/SQLiteLog%uFE55 (1) near ",": syntax error
02-05 06:47:45.604 859-859/com.example.observacao E/AndroidRuntime%uFE55 FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.observacao/com.example.observacao.ObservationActivity}: android.database.sqlite.SQLiteException: near ",": syntax error (code 1): , while compiling: create table observation( _id integer primary key autoincrement, nome text not null, idade text not null, escola text not null,observador text not null,, foto BLOB);
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.database.sqlite.SQLiteException: near ",": syntax error (code 1): , while compiling: create table observation( _id integer primary key autoincrement, nome text not null, idade text not null, escola text not null,observador text not null,, foto BLOB);
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:58)
at android.database.sqlite.SQLiteStatement.(SQLiteStatement.java:31)
at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1672)
at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1603)
at com.example.observacao.DbHelper.onCreate(DbHelper.java:39)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:252)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:164)
at com.example.observacao.DBAdapter.open(DBAdapter.java:31)
at com.example.observacao.ObservationActivity.onCreate(ObservationActivity.java:27)
at android.app.Activity.performCreate(Activity.java:5133)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
agora tem uma virgula a mais no teu banco
observador not null ,, foto
Ola!
Olha se não fosses tu eu nunca tinha visto estes erros... as voltas que não dei a este código... muito obrigado mesmo! salvaste me a vida! =)
Aqui estão me ajudar imenso, tanto na aprendizagem como nas dúvidas! Obrigado mesmo!