Solucionado (ver solução)
Solucionado
(ver solução)
2
respostas

Persistencia com SQLite

Já revisei todo código mas a aplicação não inicia e da o seguinte erro:

03-31 22:53:05.359: E/AndroidRuntime(797): FATAL EXCEPTION: main
03-31 22:53:05.359: E/AndroidRuntime(797): java.lang.RuntimeException: Unable to start activity ComponentInfo{br.com.caelum.cadastroalunos/br.com.caelum.cadastro.ListaAlunoActivity}: java.lang.NullPointerException
03-31 22:53:05.359: E/AndroidRuntime(797):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
03-31 22:53:05.359: E/AndroidRuntime(797):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
03-31 22:53:05.359: E/AndroidRuntime(797):     at android.app.ActivityThread.access$600(ActivityThread.java:130)
03-31 22:53:05.359: E/AndroidRuntime(797):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
03-31 22:53:05.359: E/AndroidRuntime(797):     at android.os.Handler.dispatchMessage(Handler.java:99)
03-31 22:53:05.359: E/AndroidRuntime(797):     at android.os.Looper.loop(Looper.java:137)
03-31 22:53:05.359: E/AndroidRuntime(797):     at android.app.ActivityThread.main(ActivityThread.java:4745)
03-31 22:53:05.359: E/AndroidRuntime(797):     at java.lang.reflect.Method.invokeNative(Native Method)
03-31 22:53:05.359: E/AndroidRuntime(797):     at java.lang.reflect.Method.invoke(Method.java:511)
03-31 22:53:05.359: E/AndroidRuntime(797):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
03-31 22:53:05.359: E/AndroidRuntime(797):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
03-31 22:53:05.359: E/AndroidRuntime(797):     at dalvik.system.NativeStart.main(Native Method)
03-31 22:53:05.359: E/AndroidRuntime(797): Caused by: java.lang.NullPointerException
03-31 22:53:05.359: E/AndroidRuntime(797):     at android.widget.ArrayAdapter.getCount(ArrayAdapter.java:330)
03-31 22:53:05.359: E/AndroidRuntime(797):     at android.widget.ListView.setAdapter(ListView.java:460)
03-31 22:53:05.359: E/AndroidRuntime(797):     at br.com.caelum.cadastro.ListaAlunoActivity.onCreate(ListaAlunoActivity.java:36)
03-31 22:53:05.359: E/AndroidRuntime(797):     at android.app.Activity.performCreate(Activity.java:5008)
03-31 22:53:05.359: E/AndroidRuntime(797):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
03-31 22:53:05.359: E/AndroidRuntime(797):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
03-31 22:53:05.359: E/AndroidRuntime(797):     ... 11 more
2 respostas
solução!

Oi Marcelo, tudo bem?

Pode postar o código da sua ListaAlunosActivity ?

Abraços!

Já está resolvido, eu estava retornando null no método getLista().

Valeu