ImageButton (Android)
Primeiramente, bom dia a todos!
Estou com um pequena problema em uma aplicação que não consegui identificar. Meu código não enxerga o ID dos meus imageButtons, e não consegui adivinhar qual é o problema. Fiz umas pesquisas no google e tentei resolver mais nada. Já aconteceu isso com mais alguém? Segue abaixo os códigos:
Classe que não enxerga os ID
Layouy com os imageButtons
as linhas que contem algum imagebutton como a: [codeImageButton btExcluir = (ImageButton) findViewById(R.id.btExcluir);][/code] não o encontra nem a pal! Quando eu dou ctrl + espaço também não aparece.
Estou com um pequena problema em uma aplicação que não consegui identificar. Meu código não enxerga o ID dos meus imageButtons, e não consegui adivinhar qual é o problema. Fiz umas pesquisas no google e tentei resolver mais nada. Já aconteceu isso com mais alguém? Segue abaixo os códigos:
Classe que não enxerga os ID
package br.livro.android.cap14.banco;
import br.livro.android.cap14.banco.Carro.Carros;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
public class EditarCarro extends Activity {
static final int RESULT_SALVAR = 1;
static final int RESULT_EXCLUIR = 2;
// Campos texto
private EditText campoNome;
private EditText campoPlaca;
private EditText campoAno;
private Long id;
protected void OnCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.form_editar_carro);
campoNome = (EditText) findViewById(R.id.campoNome);
campoPlaca = (EditText) findViewById(R.id.campoPlaca);
campoAno = (EditText) findViewById(R.id.campoAno);
id = null;
Bundle extras = getIntent().getExtras();
// Se for para editar, recuperar os valores...
if (extras != null) {
id = extras.getLong(Carros._ID);
if (id != null) {
// é uma edição, busca o carro...
Carro c = buscarCarro(id);
campoNome.setText(c.nome);
campoPlaca.setText(c.placa);
campoAno.setText(String.valueOf(c.ano));
}
}
ImageButton btCancelar = (ImageButton) findViewById(R.id.btCancelar);
btCancelar.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
setResult(RESULT_CANCELED);
// fecha a janela
finish();
}
});
// Listener para salvar o carro
ImageButton btSalvar = (ImageButton) findViewById(R.id.btSalvar);
btSalvar.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
salvar();
}
});
ImageButton btExcluir = (ImageButton) findViewById(R.id.btExcluir);
if (id == null) {
// se id está nulo, não pode excluir
btExcluir.setVisibility(View.INVISIBLE);
} else {
// Listenner para excluir o carro
btExcluir.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
excluir();
}
});
}
}
protected void onPause() {
super.onPause();
// Cancela para não ficar nada na tela pendente
setResult(RESULT_CANCELED);
// fecha a tela
finish();
}
public void salvar() {
int ano = 0;
try {
ano = Integer.parseInt(campoAno.getText().toString());
} catch (NumberFormatException e) {
// tratar isto em aplicações reais
}
Carro carro = new Carro();
if (id != null) {
// É uma atualização
carro.id = id;
}
carro.nome = campoNome.getText().toString();
carro.placa = campoPlaca.getText().toString();
carro.ano = ano;
// salvar
salvarCarro(carro);
// OK
setResult(RESULT_OK, new Intent());
// fecha a janela
finish();
}
public void excluir() {
if (id != null) {
excluirCarro(id);
}
// ok
setResult(RESULT_OK, new Intent());
// fecha a janela
finish();
}
// buscar carro pelo ID
protected Carro buscarCarro(long id) {
return CadastroCarros.repositorio.buscarCarro(id);
}
// salvar o carro
protected void salvarCarro(Carro carro) {
CadastroCarros.repositorio.salvar(carro);
}
// Excluir o carro
protected void excluirCarro(Long id) {
CadastroCarros.repositorio.deletar(id);
}
}
Layouy com os imageButtons
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000044" >
<TableRow>
<TextView
android:id="@+id/text1"
android:text="@string/lblNome"
android:textColor="#ffffff" />
<EditText
android:id="@+id/campoNome"
android:width="240dp" />
</TableRow>
<TableRow>
<TextView
android:id="@+id/text2"
android:text="@string/lblPlaca"
android:textColor="#ffffff" />
<EditText android:id="@+id/campoPlaca" />
</TableRow>
<TableRow>
<TextView
android:id="@+id/text3"
android:text="@string/lblAno"
android:textColor="#ffffff" />
<EditText
android:id="@+id/campoAno" />
</TableRow>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="fill_parent" >
<ImageButton
android:id="@+id/btCancelar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/cancelar"
android:contentDescription="@string/description"
/>
<ImageButton
android:id="@+id/btSalvar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/salvar"
android:contentDescription="@string/description"
/>
<ImageButton
android:id="@+id/btExcluir"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/excluir"
android:contentDescription="@string/description"
/>
</LinearLayout>
</TableLayout>as linhas que contem algum imagebutton como a: [codeImageButton btExcluir = (ImageButton) findViewById(R.id.btExcluir);][/code] não o encontra nem a pal! Quando eu dou ctrl + espaço também não aparece.
Fábio Carvalho
Curtidas 0
Respostas
Eduardo Pessoa
20/07/2014
não tenho certeza, mas vc colocou as imagens na pasta correta?
GOSTEI 0
Fábio Carvalho
20/07/2014
não tenho certeza, mas vc colocou as imagens na pasta correta?
Sim, não entendi. Quando voltei aqui e liguei o PC funcionou tudo certo. Só que meu projeto não ta abrindo, a aplicação ta travando. No logcat aparece:
android (pid 1305) has died
tentando descobrir o porque ta acontecendo isso. Se alguém quiser ajudar eu vou deixar o código completo aqui, é uma aplicação de cadastro de veículos com banco do SQLite
Aplicação de cadastro de veículo - Android
GOSTEI 0
Eduardo Pessoa
20/07/2014
as vezes o emulador tem dessas coisas estranhas...executou quantas vezes? e sempre aparece o motivo ou é essa mensagem?
GOSTEI 0
Fábio Carvalho
20/07/2014
No emulador ele da o problema de "Application has stop", esse daí de cima é do logcat. Não to sabendo o que fazer, não sei se to moscando em alguma activity pra declarar no manifest. Tentando aqui ainda.
GOSTEI 0
Eduardo Pessoa
20/07/2014
posta seu projeto ou envia, tem como?
GOSTEI 0
Fábio Carvalho
20/07/2014
Tem sim, é este aqui: Aplicativo de cadastro de carros.. No Log deu umas mensagens de cartão SD até habilitei mas continuo com a aplicação sendo fechada. Obrigado pela ajuda Eduardo!
GOSTEI 0
Eduardo Pessoa
20/07/2014
ainda irei tentar, lembrando que não tenho experiencia com android, uma pergunta, faço apenas a importação?
GOSTEI 0
Fábio Carvalho
20/07/2014
Sim, import>android> Existing Android Code into Workspace. Pra mais alguém que quiser tentar me ajudar, segue o log abaixo:
07-20 23:14:45.632: I/ActivityManager(385): Start proc br.livro.android.cap14.banco for activity br.livro.android.cap14.banco/.CadastroCarros: pid=1095 uid=10059 gids=
07-20 23:14:46.512: I/ARMAssembler(51): generated scanline__00000077:03010104_00008001_00000000 [ 89 ipp] (110 ins) at [0xb5fa5460:0xb5fa5618] in 0 ns
07-20 23:14:46.672: E/SQLiteLog(1095): (1) no such table: carro
07-20 23:14:46.682: E/livro(1095): Erro ao buscar os carros: android.database.sqlite.SQLiteException: no such table: carro (code 1): , while compiling: SELECT _id, nome, placa, ano FROM carro
07-20 23:14:46.772: D/AndroidRuntime(1095): Shutting down VM
07-20 23:14:46.772: W/dalvikvm(1095): threadid=1: thread exiting with uncaught exception (group=0xb2ababa8)
[b]07-20 23:14:46.812: E/AndroidRuntime(1095): FATAL EXCEPTION: main[/b]
07-20 23:14:46.812: E/AndroidRuntime(1095): Process: br.livro.android.cap14.banco, PID: 1095
07-20 23:14:46.812: E/AndroidRuntime(1095): java.lang.RuntimeException: Unable to start activity ComponentInfo{br.livro.android.cap14.banco/br.livro.android.cap14.banco.CadastroCarros}: java.lang.NullPointerException
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.app.ActivityThread.access$800(ActivityThread.java:135)
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.os.Handler.dispatchMessage(Handler.java:102)
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.os.Looper.loop(Looper.java:136)
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.app.ActivityThread.main(ActivityThread.java:5017)
07-20 23:14:46.812: E/AndroidRuntime(1095): at java.lang.reflect.Method.invokeNative(Native Method)
07-20 23:14:46.812: E/AndroidRuntime(1095): at java.lang.reflect.Method.invoke(Method.java:515)
07-20 23:14:46.812: E/AndroidRuntime(1095): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
07-20 23:14:46.812: E/AndroidRuntime(1095): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
07-20 23:14:46.812: E/AndroidRuntime(1095): at dalvik.system.NativeStart.main(Native Method)
07-20 23:14:46.812: E/AndroidRuntime(1095): Caused by: java.lang.NullPointerException
07-20 23:14:46.812: E/AndroidRuntime(1095): at br.livro.android.cap14.banco.RepositorioCarro.listarCarros(RepositorioCarro.java:135)
07-20 23:14:46.812: E/AndroidRuntime(1095): at br.livro.android.cap14.banco.CadastroCarros.atualizarLista(CadastroCarros.java:30)
07-20 23:14:46.812: E/AndroidRuntime(1095): at br.livro.android.cap14.banco.CadastroCarros.onCreate(CadastroCarros.java:25)
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.app.Activity.performCreate(Activity.java:5231)
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
07-20 23:14:46.812: E/AndroidRuntime(1095): ... 11 more
07-20 23:14:46.842: W/ActivityManager(385): Force finishing activity br.livro.android.cap14.banco/.CadastroCarros
07-20 23:14:46.852: I/Choreographer(548): Skipped 171 frames! The application may be doing too much work on its main thread.
07-20 23:14:47.112: I/Choreographer(548): Skipped 32 frames! The application may be doing too much work on its main thread.
07-20 23:14:47.172: I/WindowManager(385): Screenshot max retries 4 of Token{b3096e28 ActivityRecord{b2ff3578 u0 br.livro.android.cap14.banco/.CadastroCarros t3 f}} appWin=Window{b30085b8 u0 Starting br.livro.android.cap14.banco} drawState=4
07-20 23:14:47.172: W/WindowManager(385): Screenshot failure taking screenshot for (480x800) to layer 21010
07-20 23:14:47.422: D/dalvikvm(385): GC_FOR_ALLOC freed 433K, 23% free 5936K/7620K, paused 79ms, total 82ms
07-20 23:14:47.422: I/dalvikvm-heap(385): Grow heap (frag case) to 6.482MB for 635812-byte allocation
07-20 23:14:47.522: D/dalvikvm(385): GC_FOR_ALLOC freed 1K, 21% free 6556K/8244K, paused 98ms, total 98ms
07-20 23:14:47.922: W/ActivityManager(385): Activity pause timeout for ActivityRecord{b2ff3578 u0 br.livro.android.cap14.banco/.CadastroCarros t3 f}
07-20 23:14:48.092: I/Choreographer(385): Skipped 52 frames! The application may be doing too much work on its main thread.
07-20 23:14:48.262: I/Choreographer(548): Skipped 55 frames! The application may be doing too much work on its main thread.
07-20 23:14:48.342: I/Choreographer(385): Skipped 55 frames! The application may be doing too much work on its main thread.
07-20 23:14:48.792: I/ActivityManager(385): Killing 1049:com.svox.pico/u0a37 (adj 15): empty for 2828s
07-20 23:14:48.932: I/Choreographer(385): Skipped 37 frames! The application may be doing too much work on its main thread.
07-20 23:14:49.162: I/Choreographer(385): Skipped 33 frames! The application may be doing too much work on its main thread.
07-20 23:14:49.312: I/Choreographer(385): Skipped 36 frames! The application may be doing too much work on its main thread.
07-20 23:14:49.482: I/Choreographer(385): Skipped 42 frames! The application may be doing too much work on its main thread.
07-20 23:14:50.722: I/Process(1095): Sending signal. PID: 1095 SIG: 9
07-20 23:14:50.862: E/SoundPool(385): error loading /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:50.862: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:50.922: E/SoundPool(385): error loading /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:50.932: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:50.992: E/SoundPool(385): error loading /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:50.992: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:51.002: E/SoundPool(385): error loading /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:51.012: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:51.012: E/SoundPool(385): error loading /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:51.012: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:51.092: E/SoundPool(385): error loading /system/media/audio/ui/KeypressStandard.ogg
07-20 23:14:51.092: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
07-20 23:14:51.132: E/SoundPool(385): error loading /system/media/audio/ui/KeypressSpacebar.ogg
07-20 23:14:51.132: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
07-20 23:14:51.182: E/SoundPool(385): error loading /system/media/audio/ui/KeypressDelete.ogg
07-20 23:14:51.182: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
07-20 23:14:51.212: E/SoundPool(385): error loading /system/media/audio/ui/KeypressReturn.ogg
07-20 23:14:51.212: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
07-20 23:14:51.222: E/SoundPool(385): error loading /system/media/audio/ui/KeypressInvalid.ogg
07-20 23:14:51.222: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/KeypressInvalid.ogg
07-20 23:14:51.222: W/AudioService(385): onLoadSoundEffects(), Error -1 while loading samples
07-20 23:14:51.422: I/Choreographer(385): Skipped 167 frames! The application may be doing too much work on its main thread.
07-20 23:14:51.762: I/Choreographer(385): Skipped 70 frames! The application may be doing too much work on its main thread.
07-20 23:14:52.102: I/Choreographer(385): Skipped 71 frames! The application may be doing too much work on its main thread.
07-20 23:14:52.492: W/InputMethodManagerService(385): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@b2ea2d88 attribute=null, token = android.os.BinderProxy@b3065de8
07-20 23:14:52.812: I/ActivityManager(385): Process br.livro.android.cap14.banco (pid 1095) has died.
07-20 23:15:01.002: D/ConnectivityService(385): Sampling interval elapsed, updating statistics ..
07-20 23:15:01.152: D/ConnectivityService(385): Done.
07-20 23:15:01.152: D/ConnectivityService(385): Setting timer for 720seconds
07-20 23:14:46.512: I/ARMAssembler(51): generated scanline__00000077:03010104_00008001_00000000 [ 89 ipp] (110 ins) at [0xb5fa5460:0xb5fa5618] in 0 ns
07-20 23:14:46.672: E/SQLiteLog(1095): (1) no such table: carro
07-20 23:14:46.682: E/livro(1095): Erro ao buscar os carros: android.database.sqlite.SQLiteException: no such table: carro (code 1): , while compiling: SELECT _id, nome, placa, ano FROM carro
07-20 23:14:46.772: D/AndroidRuntime(1095): Shutting down VM
07-20 23:14:46.772: W/dalvikvm(1095): threadid=1: thread exiting with uncaught exception (group=0xb2ababa8)
[b]07-20 23:14:46.812: E/AndroidRuntime(1095): FATAL EXCEPTION: main[/b]
07-20 23:14:46.812: E/AndroidRuntime(1095): Process: br.livro.android.cap14.banco, PID: 1095
07-20 23:14:46.812: E/AndroidRuntime(1095): java.lang.RuntimeException: Unable to start activity ComponentInfo{br.livro.android.cap14.banco/br.livro.android.cap14.banco.CadastroCarros}: java.lang.NullPointerException
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.app.ActivityThread.access$800(ActivityThread.java:135)
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.os.Handler.dispatchMessage(Handler.java:102)
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.os.Looper.loop(Looper.java:136)
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.app.ActivityThread.main(ActivityThread.java:5017)
07-20 23:14:46.812: E/AndroidRuntime(1095): at java.lang.reflect.Method.invokeNative(Native Method)
07-20 23:14:46.812: E/AndroidRuntime(1095): at java.lang.reflect.Method.invoke(Method.java:515)
07-20 23:14:46.812: E/AndroidRuntime(1095): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
07-20 23:14:46.812: E/AndroidRuntime(1095): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
07-20 23:14:46.812: E/AndroidRuntime(1095): at dalvik.system.NativeStart.main(Native Method)
07-20 23:14:46.812: E/AndroidRuntime(1095): Caused by: java.lang.NullPointerException
07-20 23:14:46.812: E/AndroidRuntime(1095): at br.livro.android.cap14.banco.RepositorioCarro.listarCarros(RepositorioCarro.java:135)
07-20 23:14:46.812: E/AndroidRuntime(1095): at br.livro.android.cap14.banco.CadastroCarros.atualizarLista(CadastroCarros.java:30)
07-20 23:14:46.812: E/AndroidRuntime(1095): at br.livro.android.cap14.banco.CadastroCarros.onCreate(CadastroCarros.java:25)
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.app.Activity.performCreate(Activity.java:5231)
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
07-20 23:14:46.812: E/AndroidRuntime(1095): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
07-20 23:14:46.812: E/AndroidRuntime(1095): ... 11 more
07-20 23:14:46.842: W/ActivityManager(385): Force finishing activity br.livro.android.cap14.banco/.CadastroCarros
07-20 23:14:46.852: I/Choreographer(548): Skipped 171 frames! The application may be doing too much work on its main thread.
07-20 23:14:47.112: I/Choreographer(548): Skipped 32 frames! The application may be doing too much work on its main thread.
07-20 23:14:47.172: I/WindowManager(385): Screenshot max retries 4 of Token{b3096e28 ActivityRecord{b2ff3578 u0 br.livro.android.cap14.banco/.CadastroCarros t3 f}} appWin=Window{b30085b8 u0 Starting br.livro.android.cap14.banco} drawState=4
07-20 23:14:47.172: W/WindowManager(385): Screenshot failure taking screenshot for (480x800) to layer 21010
07-20 23:14:47.422: D/dalvikvm(385): GC_FOR_ALLOC freed 433K, 23% free 5936K/7620K, paused 79ms, total 82ms
07-20 23:14:47.422: I/dalvikvm-heap(385): Grow heap (frag case) to 6.482MB for 635812-byte allocation
07-20 23:14:47.522: D/dalvikvm(385): GC_FOR_ALLOC freed 1K, 21% free 6556K/8244K, paused 98ms, total 98ms
07-20 23:14:47.922: W/ActivityManager(385): Activity pause timeout for ActivityRecord{b2ff3578 u0 br.livro.android.cap14.banco/.CadastroCarros t3 f}
07-20 23:14:48.092: I/Choreographer(385): Skipped 52 frames! The application may be doing too much work on its main thread.
07-20 23:14:48.262: I/Choreographer(548): Skipped 55 frames! The application may be doing too much work on its main thread.
07-20 23:14:48.342: I/Choreographer(385): Skipped 55 frames! The application may be doing too much work on its main thread.
07-20 23:14:48.792: I/ActivityManager(385): Killing 1049:com.svox.pico/u0a37 (adj 15): empty for 2828s
07-20 23:14:48.932: I/Choreographer(385): Skipped 37 frames! The application may be doing too much work on its main thread.
07-20 23:14:49.162: I/Choreographer(385): Skipped 33 frames! The application may be doing too much work on its main thread.
07-20 23:14:49.312: I/Choreographer(385): Skipped 36 frames! The application may be doing too much work on its main thread.
07-20 23:14:49.482: I/Choreographer(385): Skipped 42 frames! The application may be doing too much work on its main thread.
07-20 23:14:50.722: I/Process(1095): Sending signal. PID: 1095 SIG: 9
07-20 23:14:50.862: E/SoundPool(385): error loading /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:50.862: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:50.922: E/SoundPool(385): error loading /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:50.932: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:50.992: E/SoundPool(385): error loading /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:50.992: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:51.002: E/SoundPool(385): error loading /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:51.012: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:51.012: E/SoundPool(385): error loading /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:51.012: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
07-20 23:14:51.092: E/SoundPool(385): error loading /system/media/audio/ui/KeypressStandard.ogg
07-20 23:14:51.092: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
07-20 23:14:51.132: E/SoundPool(385): error loading /system/media/audio/ui/KeypressSpacebar.ogg
07-20 23:14:51.132: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
07-20 23:14:51.182: E/SoundPool(385): error loading /system/media/audio/ui/KeypressDelete.ogg
07-20 23:14:51.182: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
07-20 23:14:51.212: E/SoundPool(385): error loading /system/media/audio/ui/KeypressReturn.ogg
07-20 23:14:51.212: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
07-20 23:14:51.222: E/SoundPool(385): error loading /system/media/audio/ui/KeypressInvalid.ogg
07-20 23:14:51.222: W/AudioService(385): Soundpool could not load file: /system/media/audio/ui/KeypressInvalid.ogg
07-20 23:14:51.222: W/AudioService(385): onLoadSoundEffects(), Error -1 while loading samples
07-20 23:14:51.422: I/Choreographer(385): Skipped 167 frames! The application may be doing too much work on its main thread.
07-20 23:14:51.762: I/Choreographer(385): Skipped 70 frames! The application may be doing too much work on its main thread.
07-20 23:14:52.102: I/Choreographer(385): Skipped 71 frames! The application may be doing too much work on its main thread.
07-20 23:14:52.492: W/InputMethodManagerService(385): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@b2ea2d88 attribute=null, token = android.os.BinderProxy@b3065de8
07-20 23:14:52.812: I/ActivityManager(385): Process br.livro.android.cap14.banco (pid 1095) has died.
07-20 23:15:01.002: D/ConnectivityService(385): Sampling interval elapsed, updating statistics ..
07-20 23:15:01.152: D/ConnectivityService(385): Done.
07-20 23:15:01.152: D/ConnectivityService(385): Setting timer for 720seconds
GOSTEI 0
Andre Santos..
20/07/2014
opa ja tentou ir la
em Project -> clean
ai vai la de novo
Project -> build Project
em Project -> clean
ai vai la de novo
Project -> build Project
GOSTEI 0
Fábio Carvalho
20/07/2014
opa ja tentou ir la
em Project -> clean
ai vai la de novo
Project -> build Project
em Project -> clean
ai vai la de novo
Project -> build Project
Também não deu, tinha só uns import's que não estavam sendo utilizados.
GOSTEI 0
Fábio Carvalho
20/07/2014
Putz galera, foi mal! Agora que vi que o Banco não ta no zip! Quando eu sair do serviço eu posto tudo completo aqui + banco.
GOSTEI 0
Eduardo Pessoa
20/07/2014
estou com uma pequena duvida, é que tenho um projeto no meu eclipse, e tem uma pasta chamada "appcompat_v7", quando vou fazer a importação aparece ela novamente, acho que ja abri um post sobre essa pasta, mas não o que é e para que serve.
[img]http://arquivo.devmedia.com.br/forum/imagem/310862-20140721-131129.jpg[/img]
[img]http://arquivo.devmedia.com.br/forum/imagem/310862-20140721-131129.jpg[/img]
GOSTEI 0
Fábio Carvalho
20/07/2014
estou com uma pequena duvida, é que tenho um projeto no meu eclipse, e tem uma pasta chamada "appcompat_v7", quando vou fazer a importação aparece ela novamente, acho que ja abri um post sobre essa pasta, mas não o que é e para que serve.
[img]http://arquivo.devmedia.com.br/forum/imagem/310862-20140721-131129.jpg[/img]
[img]http://arquivo.devmedia.com.br/forum/imagem/310862-20140721-131129.jpg[/img]
Ela é uma biblioteca de suporte que o eclipse incluí automaticamente.
GOSTEI 0
Eduardo Pessoa
20/07/2014
isso significa que a cada projeto será criado uma nova pasta como essa?
GOSTEI 0
Fábio Carvalho
20/07/2014
isso significa que a cada projeto será criado uma nova pasta como essa?
Não, ele vai criar está pasta só uma vez. Não estou entendendo bem o que, que a google tem feito com a SDK , antigamente não tinha essa appcombat, aí colocaram ela, só que toda vez que criava um projeto era criado uma nova appcombat. Mas nesta ultima versão agora, ele tem criado só uma appcombat para todos os projetos.
Sei apenas que o intuíto do appcompat_v7 vem para alinhar a compatibilidade de versões antigas de aplicativos para Androids mais novos.
GOSTEI 0
Eduardo Pessoa
20/07/2014
Fabio, estou tentando utilizando outro Eclipse, sem sucesso. ficarei tentando.
GOSTEI 0
Fábio Carvalho
20/07/2014
Fabio, estou tentando utilizando outro Eclipse, sem sucesso. ficarei tentando.
Ok Eduardo, obrigado!
Peguei o banco também -> livro_banco
Tentei criar outro projeto e sem sucesso, o log agora aponta erro no banco. Não sei o que pode ser...
GOSTEI 0
Eduardo Pessoa
20/07/2014
sabe o que pode ser esse erro?
[url]https://www.devmedia.com.br/forum/erro-no-eclipse/486226[/url]
[url]https://www.devmedia.com.br/forum/erro-no-eclipse/486226[/url]
GOSTEI 0
Fábio Carvalho
20/07/2014
sabe o que pode ser esse erro?
[url]https://www.devmedia.com.br/forum/erro-no-eclipse/486226[/url]
[url]https://www.devmedia.com.br/forum/erro-no-eclipse/486226[/url]
Coloquei la. o/
Alguém sobre minha dúvida?
GOSTEI 0
Eduardo Pessoa
20/07/2014
obrigado.
GOSTEI 0
Rodrigo Felix
20/07/2014
Boa tarde amigo, tive problemas semelhantes, porém resolvi depois de ter percebido que o eclipse nao avisa que os arquivos xml no android nao aceitam numeros nem Maiusculas em seus nomes.
GOSTEI 0