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

Toast do FormulatioActivity não aparece

Olá o Toast não esta aparecendo quando crio um novo aluno, eu clico no check ele salva o aluno no banco, aparece na ListaAlunosActivity ms não diz a frase "Aluno salvo!"

FormularioActivity.java

public class FormularioActivity extends AppCompatActivity {
    private FormularioHelper helper;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_formulario);

        helper = new FormularioHelper(this);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.menu_formulario, menu);

        return super.onCreateOptionsMenu(menu);
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()){
            case R.id.menu_formulario_ok:
                Aluno aluno = helper.pegaAluno();
                AlunoDAO dao = new AlunoDAO(this);
                dao.insere(aluno);
                dao.close();

                Toast.makeText(this, "Aluno " + aluno.getNome() + "salvo!",Toast.LENGTH_SHORT).show();

                finish();
                break;
        }
        return super.onOptionsItemSelected(item);
    }
}

Obs: dei um Log.d("Edu","Aluno: " + aluno.getNome()); logo apos o Toast e o Log funciona de boa.

6 respostas

Tenta passar a activity que tu tá pro toast:

Toast.makeText(FormularioActivity.this, "Aluno ” + aluno.getNome() + " salvo!”, Toast.LENGTH_SHORT).show();

Olá Vânia, continua não aparecendo

Eduardo, teu código tá certo. Não sei porque não tá aparecendo :( Tu já tentou fazer outro Toast em outra parte do código pra ver se tá normal?

Vânia, eu coloquei o Toast no onCreate do FormularioActivity e nada, no onCreate do ListaAlunosActivity e no onResume e nenhum apareceu. Todos eles estão com o import android.widget.Toast;

Obs:. nesse caso eu posso passar o this em vez de ListaAlunosActivity.this ne? ja que eu estou no proprio contexto. E ja teste das duas formar e nada de aparecer.

ListaAlunosActivity.java

package br.com.alura.agenda;

import android.content.Intent;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;

import java.util.List;

import br.com.alura.agenda.dao.AlunoDAO;
import br.com.alura.agenda.modelo.Aluno;

public class ListaAlunosActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_lista_alunos);
        Toast.makeText(this, "onCreate Lista",Toast.LENGTH_SHORT).show();
        FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intentVaiProFormulario = new Intent(ListaAlunosActivity.this, FormularioActivity.class);
                startActivity(intentVaiProFormulario);
            }
        });
    }

    private void carregaLista() {
        AlunoDAO dao = new AlunoDAO(this);
        List<Aluno> alunos = dao.buscaAlunos();
        dao.close();

        ListView listaAlunos = (ListView) findViewById(R.id.lista_alunos);
        ArrayAdapter<Aluno> adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, alunos);
        listaAlunos.setAdapter(adapter);
    }

    @Override
    protected void onResume() {
        super.onResume();
        carregaLista();
        Toast.makeText(this, "onResume()",Toast.LENGTH_SHORT).show();
    }
}

logcat

10-22 20:52:20.401 14024-14073/? I/ReschedulableTimer: [#CMH#] ReschedulableTimer started 
10-22 20:52:21.531 2522-2939/? I/InputReader: Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.1798 ] when=29324625727000
10-22 20:52:21.531 2522-2939/? D/InputReader: lastThreadEndTime = 29317621353299, currentThreadStartTime = 29317621357222, diff = 0
10-22 20:52:21.531 2522-2938/? I/InputDispatcher: Delivering touch to (3051): action: 0x4, toolType: 1
10-22 20:52:21.531 2522-2938/? I/InputDispatcher: Delivering touch to (3455): action: 0x0, toolType: 1
10-22 20:52:21.531 2522-2938/? I/InputDispatcher: Delivering touch to (3051): action: 0x0, toolType: 1
10-22 20:52:21.531 3455-3455/? D/ViewRootImpl: ViewPostImeInputStage processPointer 0

                                               --------- beginning of system
10-22 20:52:21.531 2522-3308/? D/CustomFrequencyManagerService: acquireDVFSLockLocked : type : DVFS_MIN_LIMIT  frequency : 1100000  uid : 1000  pid : 2522  pkgName : com.sec.android.app.launcher@1
10-22 20:52:21.571 3455-3455/? I/Launcher.PagedView: determineScrollingStart : mTouchState=0, mIsPageMoving=false
10-22 20:52:21.581 3455-3455/? I/Launcher.PagedView: determineScrollingStart : mTouchState=0, mIsPageMoving=false
10-22 20:52:21.591 2522-2939/? I/InputReader: Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] when=29324696052000
10-22 20:52:21.591 2522-2938/? I/InputDispatcher: Delivering touch to (3455): action: 0x1, toolType: 1
10-22 20:52:21.591 2522-2938/? I/InputDispatcher: Delivering touch to (3051): action: 0x1, toolType: 1
10-22 20:52:21.591 3455-3455/? D/ViewRootImpl: ViewPostImeInputStage processPointer 1
10-22 20:52:21.591 2522-2536/? D/CustomFrequencyManagerService: releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT  frequency : 1100000  uid : 1000  pid : 2522  tag : com.sec.android.app.launcher@1
10-22 20:52:21.601 2522-3399/? D/CustomFrequencyManagerService: acquireDVFSLockLocked : type : DVFS_MIN_LIMIT  frequency : 1500000  uid : 1000  pid : 2522  pkgName : LAUNCHER_APP_BOOSTER_CPU@7
10-22 20:52:21.601 3455-3455/? I/Timeline: Timeline: Activity_launch_request id:br.com.alura.agenda time:29324709
10-22 20:52:21.611 2522-2978/? D/VirtualScreenPolicy: applyVirtualScreenAttrs attrs=VirtualScreenAttrs{mDisplayId=0, mBaseDisplayId=0, mBaseActivity=false}
10-22 20:52:21.611 2522-2978/? D/CustomFrequencyManagerService: acquireDVFSLockLocked : type : DVFS_MIN_LIMIT  frequency : 1300000  uid : 1000  pid : 2522  pkgName : ACTIVITY_RESUME_BOOSTER@4
10-22 20:52:21.611 2522-2978/? D/ActivityManager: mDVFSHelper.acquire()
10-22 20:52:21.611 2522-2978/? V/WindowManager: addAppToken: AppWindowToken{d0ddac28b token=Token{4cf005a ActivityRecord{47f6805 u0 br.com.alura.agenda/.ListaAlunosActivity t66}}} to stack=1 task=66 at 0
10-22 20:52:21.611 2522-2978/? D/ActivityTrigger: ActivityTrigger activityPauseTrigger 
10-22 20:52:21.611 2522-2978/? D/InputDispatcher: Focused application set to: xxxx
10-22 20:52:21.611 2522-2978/? D/InputDispatcher: Focus left window: 3455
10-22 20:52:21.611 3455-3455/? D/Launcher: onPause, Launcher: 217768695
10-22 20:52:21.621 3455-3455/? D/Launcher.HomeView: onPause
10-22 20:52:21.621 3455-3455/? D/Launcher.Workspace: exitWidgetResizeMode. isClearResizeFrame is false
10-22 20:52:21.621 2522-2653/? D/ViewRootImpl: #1 mView = com.android.internal.policy.PhoneWindow$DecorView{47792bd V.E...... R.....ID 0,0-0,0}
10-22 20:52:21.621 2522-2604/? V/BroadcastQueue: [background] Process cur broadcast BroadcastRecord{59ab380 u0 com.samsung.android.providers.context.log.action.USE_APP_FEATURE_SURVEY qIdx=4}, state= (APP_RECEIVE) DELIVERED for app ProcessRecord{4e4af4b 4078:com.samsung.android.providers.context/u0a164}
10-22 20:52:21.621 2522-2653/? D/PointerIcon: setMouseIconStyle1 pointerType: 1001 iconType:101 flag:0 pid:2522 uid:1000
10-22 20:52:21.621 2522-2536/? D/MountService: getExternalStorageMountMode : 1
10-22 20:52:21.621 2522-2653/? D/PointerIcon: setMouseCustomIcon IconType is same.101
10-22 20:52:21.621 2522-2536/? D/MountService: getExternalStorageMountMode : 3
10-22 20:52:21.621 2522-2536/? D/MountService: getExternalStorageMountMode : final mountMode=1, uid : 10204, packageName : br.com.alura.agenda
10-22 20:52:21.631 15285-15285/? E/Zygote: v2
10-22 20:52:21.631 15285-15285/? I/libpersona: KNOX_SDCARD checking this for 10204
10-22 20:52:21.631 15285-15285/? I/libpersona: KNOX_SDCARD not a persona
10-22 20:52:21.631 15285-15285/? W/SELinux: Function: selinux_compare_spd_ram, index[1], priority [2], priority version is VE=SEPF_SECMOBILE_6.0.1_0029
10-22 20:52:21.631 2522-2536/? I/ActivityManager: Start proc 15285:br.com.alura.agenda/u0a204 for activity br.com.alura.agenda/.ListaAlunosActivity
10-22 20:52:21.631 15285-15285/? E/Zygote: accessInfo : 0
10-22 20:52:21.631 15285-15285/? W/SELinux: SELinux: seapp_context_lookup: seinfo=default, level=s0:c512,c768, pkgname=br.com.alura.agenda 
10-22 20:52:21.631 15285-15285/? I/art: Late-enabling -Xcheck:jni
10-22 20:52:21.631 2137-2137/? I/SurfaceFlinger: id=739 createSurf (1x1),1 flag=404, bgenda
10-22 20:52:21.651 2522-2653/? D/ViewRootImpl: MSG_RESIZED_REPORT: ci=Rect(0, 48 - 0, 0) vi=Rect(0, 48 - 0, 0) or=1
10-22 20:52:21.661 15285-15285/? D/TimaKeyStoreProvider: TimaSignature is unavailable
10-22 20:52:21.661 15285-15285/? D/ActivityThread: Added TimaKeyStore provider
10-22 20:52:21.661 2522-3475/? V/WindowOrientationListener: setCurrentAppOrientation :-1
10-22 20:52:21.661 2522-3475/? V/WindowOrientationListener: OrientationSensorJudge.getProposedRotation, Rotation: -1
10-22 20:52:21.661 2522-3475/? V/WindowManager: rotationForOrientationLw(orient=-1, last=0); user=0  sensorRotation=-1 mLidState=-1 mDockMode=0 mHdmiPlugged=false mMobileKeyboardEnabled=false displayId=0
10-22 20:52:21.661 2522-3475/? V/WindowOrientationListener: OrientationSensorJudge.getProposedRotation, Rotation: -1
10-22 20:52:21.661 2522-3475/? D/ActivityManager:  Launching br.com.alura.agenda, updated priority
10-22 20:52:21.661 2522-2522/? D/GameManagerService: NotifyRunnable. pkg: br.com.alura.agenda, type: 4, isMinimized: false, isTunableApp: false
10-22 20:52:21.661 2522-2522/? D/GameManagerService: unexpected mPrevNotiType: -1
10-22 20:52:21.671 2522-2653/? V/WindowStateAnimator: Finishing drawing window Window{cc6f803 u0 d0 p2522 Starting br.com.alura.agenda}: mDrawState=DRAW_PENDING
10-22 20:52:21.671 2522-2604/? V/MARsPolicyManager: updatePackagesScore PackageInfo name -- br.com.alura.agenda
10-22 20:52:21.671 2522-2606/? D/StatusBarManagerService: manageDisableList userId=0 what=0x0 pkg=Window{cc6f803 u0 d0 p2522 Starting br.com.alura.agenda}
10-22 20:52:21.681 15285-15285/br.com.alura.agenda D/ResourcesManager: For user 0 new overlays fetched Null
10-22 20:52:21.681 2137-2137/? D/libEGL: eglInitialize EGLDisplay = 0xfff78fbc
10-22 20:52:21.681 2522-5131/? D/GameManagerService: identifyGamePackage. br.com.alura.agenda
10-22 20:52:21.681 2522-5131/? D/GameManagerService: GameService is not exist
10-22 20:52:21.691 2137-2948/? D/libEGL: eglTerminate EGLDisplay = 0xf3fff624
10-22 20:52:21.691 2137-2948/? D/libEGL: eglTerminate EGLDisplay = 0xf3fff624
10-22 20:52:21.691 15285-15285/br.com.alura.agenda W/System: ClassLoader referenced unknown path: /data/app/br.com.alura.agenda-1/lib/arm
10-22 20:52:21.691 15285-15285/br.com.alura.agenda I/InstantRun: Instant Run Runtime started. Android package is br.com.alura.agenda, real application class is null.
10-22 20:52:21.821 15285-15285/br.com.alura.agenda W/System: ClassLoader referenced unknown path: /data/app/br.com.alura.agenda-1/lib/arm
10-22 20:52:21.821 15285-15285/br.com.alura.agenda D/ContextRelationManager: ContextRelationManager() : FEATURE_ENABLED=true
10-22 20:52:21.821 15285-15285/br.com.alura.agenda D/RelationGraph: garbageCollect()
10-22 20:52:21.931 15285-15285/br.com.alura.agenda D/RelationGraph: garbageCollect()
10-22 20:52:22.001 15285-15285/br.com.alura.agenda W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
10-22 20:52:22.051 2137-2948/? I/SurfaceFlinger: id=738 Removed MauncherAct (2/8)
10-22 20:52:22.051 2137-2220/? I/SurfaceFlinger: id=738 Removed MauncherAct (-2/8)
10-22 20:52:22.051 3051-3051/? D/ImageWallpaper: onVisibilityChanged:false
10-22 20:52:22.051 3051-3051/? D/ImageWallpaper: drawFrame:false rotation:0 mLastRotation:0
10-22 20:52:22.051 3051-3051/? D/ImageWallpaper: drawFrame:[frame.width()]1280[frame.height()]1280
10-22 20:52:22.051 3051-3051/? D/ImageWallpaper: Suppressed drawFrame since redraw is not needed and offsets have not changed.
10-22 20:52:22.071 2137-2137/? D/libEGL: eglTerminate EGLDisplay = 0xfff79034
10-22 20:52:22.181 15285-15285/br.com.alura.agenda D/AbsListView: Get MotionRecognitionManager
10-22 20:52:22.181 15285-15285/br.com.alura.agenda E/MotionRecognitionManager: mSContextService = android.hardware.scontext.ISContextService$Stub$Proxy@99aacfc
10-22 20:52:22.181 15285-15285/br.com.alura.agenda E/MotionRecognitionManager: motionService = com.samsung.android.motion.IMotionRecognitionService$Stub$Proxy@e789f85
10-22 20:52:22.181 15285-15285/br.com.alura.agenda E/MotionRecognitionManager: motionService = com.samsung.android.motion.IMotionRecognitionService$Stub$Proxy@e789f85
10-22 20:52:22.181 2522-3100/? D/MotionRecognitionService:  ssp status : false
10-22 20:52:22.241 2522-3086/? D/SecContentProvider2: query(), uri = 15 selection = getToastGravityEnabledState
10-22 20:52:22.241 2522-3308/? D/SecContentProvider2: query(), uri = 15 selection = getToastEnabledState
10-22 20:52:22.241 2522-3514/? D/SecContentProvider2: query(), uri = 15 selection = getToastShowPackageNameState
10-22 20:52:22.241 2522-2535/? V/NotificationService: notifications are disabled by AppOps for br.com.alura.agenda
10-22 20:52:22.241 2522-2535/? E/NotificationService: Suppressing toast from package br.com.alura.agenda by user request.
10-22 20:52:22.261 2522-3395/? D/SecContentProvider2: query(), uri = 15 selection = getToastGravityEnabledState
10-22 20:52:22.261 2522-3359/? D/SecContentProvider2: query(), uri = 15 selection = getToastEnabledState
10-22 20:52:22.261 2522-2536/? D/SecContentProvider2: query(), uri = 15 selection = getToastShowPackageNameState
10-22 20:52:22.261 2522-3477/? V/NotificationService: notifications are disabled by AppOps for br.com.alura.agenda
10-22 20:52:22.261 2522-3477/? E/NotificationService: Suppressing toast from package br.com.alura.agenda by user request.
10-22 20:52:22.291 15285-15285/br.com.alura.agenda D/ViewRootImpl: #1 mView = com.android.internal.policy.PhoneWindow$DecorView{aa65bcf I.E...... R.....ID 0,0-0,0}
10-22 20:52:22.291 15285-15320/br.com.alura.agenda D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
10-22 20:52:22.291 2522-2978/? D/ActivityManager: post active user change for 0 fullscreen true isFloatingActivity() false isHomeActivity() false
10-22 20:52:22.291 2522-2978/? D/KnoxTimeoutHandler: postActiveUserChange [MsgParam] userId: 0 fullscreen is true showWhenlocked is false
10-22 20:52:22.291 2522-2522/? D/KnoxTimeoutHandler: handleActiveUserChange [MsgParam] userId: 0 fullscreen is true showWhenlocked is false
10-22 20:52:22.291 2522-2522/? I/KnoxTimeoutHandler: Shared devices show user statefalse
10-22 20:52:22.321 2137-2137/? I/SurfaceFlinger: id=740 createSurf (1x1),1 flag=404, MistaAlunos
10-22 20:52:22.321 2137-2256/? W/SurfaceFlinger: Ignoring duplicate VSYNC event from HWC (t=29325424072755)
10-22 20:52:22.331 2522-3359/? D/InputDispatcher: Focus entered window: 15285
10-22 20:52:22.341 2522-2653/? D/PointerIcon: setMouseIconStyle1 pointerType: 1001 iconType:101 flag:0 pid:2522 uid:1000
10-22 20:52:22.341 2522-2653/? D/PointerIcon: setMouseCustomIcon IconType is same.101
10-22 20:52:22.371 15285-15320/br.com.alura.agenda D/libEGL: loaded /vendor/lib/egl/libGLES_mali.so
10-22 20:52:22.391 15285-15320/br.com.alura.agenda D/libEGL: eglInitialize EGLDisplay = 0xe19837c4
10-22 20:52:22.391 15285-15320/br.com.alura.agenda I/OpenGLRenderer: Initialized EGL, version 1.4
10-22 20:52:22.401 15285-15320/br.com.alura.agenda D/mali_winsys: new_window_surface returns 0x3000,  [720x1280]-format:1
10-22 20:52:22.421 2522-3399/? D/BatteryService: !@BatteryListener : batteryPropertiesChanged!
10-22 20:52:22.421 2522-3399/? D/BatteryService: level:100, scale:100, status:5, health:2, present:true, voltage: 4336, temperature: 284, technology: Li-ion, AC powered:false, USB powered:true, POGO powered:false, Wireless powered:false, icon:17303443, invalid charger:0, maxChargingCurrent:0
10-22 20:52:22.421 2522-3399/? D/BatteryService: online:4, current avg:500, charge type:0, power sharing:false, high voltage charger:false, capacity:280000, batterySWSelfDischarging:false, current_now:500
10-22 20:52:22.421 2522-2522/? D/BatteryService: Sending ACTION_BATTERY_CHANGED.
10-22 20:52:22.421 2522-2522/? I/MotionRecognitionService: Plugged
10-22 20:52:22.421 2522-2522/? D/MotionRecognitionService:   cableConnection= 1
10-22 20:52:22.421 2522-2522/? D/MotionRecognitionService: setPowerConnected | current backoff  = 1024 , state =1024
10-22 20:52:22.421 2522-2522/? D/MotionRecognitionService: skip setTransmitPower. 
10-22 20:52:22.431 3051-3051/? D/KeyguardUpdateMonitor: received broadcast android.intent.action.BATTERY_CHANGED
10-22 20:52:22.431 3051-3051/? D/PowerUI: priorPlugType = 2 mPlugType =  2
10-22 20:52:22.431 3051-3051/? D/KeyguardUpdateMonitor: handleBatteryUpdate
10-22 20:52:22.431 3051-3051/? D/BatteryMeterView: ACTION_BATTERY_CHANGED : level:100 status:5 health:2
10-22 20:52:22.441 3051-3051/? D/BatteryMeterView: ACTION_BATTERY_CHANGED : level:100 status:5 health:2
10-22 20:52:22.451 15285-15320/br.com.alura.agenda D/libGLESv1: DTS_GLAPI : DTS is not allowed for Package : br.com.alura.agenda
10-22 20:52:22.471 2137-2137/? D/libEGL: eglInitialize EGLDisplay = 0xfff78fbc
10-22 20:52:22.471 2522-2535/? V/WindowStateAnimator: Finishing drawing window Window{a98340a u0 d0 p15285 br.com.alura.agenda/br.com.alura.agenda.ListaAlunosActivity}: mDrawState=DRAW_PENDING
10-22 20:52:22.471 15285-15285/br.com.alura.agenda D/ViewRootImpl: MSG_RESIZED_REPORT: ci=Rect(0, 48 - 0, 0) vi=Rect(0, 48 - 0, 0) or=1
10-22 20:52:22.471 2522-2978/? D/InputMethodManagerService: windowGainedFocus mCurrentFocusedUserId - 0 and mSecureKeypadEnabled-false
10-22 20:52:22.471 2522-2653/? D/KnoxTimeoutHandler: notifyActivityDrawn [MsgParam] userId: 0 fullscreen is true showWhenlocked is false
10-22 20:52:22.471 2522-2522/? D/KnoxTimeoutHandler: activityDrawn [MsgParam] userId: 0 fullscreen is true showWhenlocked is false
10-22 20:52:22.471 2522-2653/? I/ActivityManager: Displayed br.com.alura.agenda/.ListaAlunosActivity: +856ms
10-22 20:52:22.471 2522-2653/? D/CustomFrequencyManagerService: releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT  frequency : 1300000  uid : 1000  pid : 2522  tag : ACTIVITY_RESUME_BOOSTER@4
10-22 20:52:22.471 2522-2522/? I/KnoxTimeoutHandler: SD activityfalse
10-22 20:52:22.471 2522-2653/? D/CustomFrequencyManagerService: FrequencyrequestList.getNextCStateDisableRequest, index: 1
10-22 20:52:22.471 2522-2522/? I/KnoxTimeoutHandler: Fullscreen and mCurrent is not KNOX user. Hence hide keyguard
10-22 20:52:22.471 2522-2653/? D/ActivityManager: mDVFSHelper.release()
10-22 20:52:22.471 2522-2653/? I/Timeline: Timeline: Activity_windows_visible id: ActivityRecord{47f6805 u0 br.com.alura.agenda/.ListaAlunosActivity t66} time:29325579
10-22 20:52:22.481 2522-2604/? D/CustomFrequencyManagerService: acquireDVFSLockLocked : type : DVFS_MIN_LIMIT  frequency : 1300000  uid : 1000  pid : 2522  pkgName : ACTIVITY_RESUME_BOOSTER@10
10-22 20:52:22.471 2522-2653/? D/ViewRootImpl: #3 mView = null
10-22 20:52:22.481 3716-3716/? D/SamsungIME: IMPL finishInput
10-22 20:52:22.481 3716-3716/? D/SamsungIME: SwiftKeyWrapper writeDBdataToFileOnFinishInput
10-22 20:52:22.481 3716-3716/? D/SamsungIME: saveAndClear +
10-22 20:52:22.481 3716-3716/? D/SamsungIME: saveAndClear -
10-22 20:52:22.481 3716-3716/? D/SamsungIME: onStartInput: No inputType, No imeOption, isInputViewShown = false, isExtractViewShown = false, isShowInputRequested = false, isConfigChanged = false
10-22 20:52:22.481 2137-2137/? D/libEGL: eglInitialize EGLDisplay = 0xfff78fbc
10-22 20:52:22.491 2522-2536/? V/WindowStateAnimator: Finishing drawing window Window{a98340a u0 d0 p15285 br.com.alura.agenda/br.com.alura.agenda.ListaAlunosActivity}: mDrawState=HAS_DRAWN
10-22 20:52:22.491 15285-15285/br.com.alura.agenda I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@188ca30 time:29325592
10-22 20:52:22.491 2522-3477/? D/ActivityTrigger: ActivityTrigger activityStopTrigger 
10-22 20:52:22.491 3455-3455/? D/Launcher.HomeView: onStop
10-22 20:52:22.491 3455-3455/? D/capture: ----destroy
10-22 20:52:22.491 3455-3455/? V/ActivityThread: updateVisibility : ActivityRecord{3cfeda4 token=android.os.BinderProxy@630d691 {com.sec.android.app.launcher/com.sec.android.app.launcher.activities.LauncherActivity}} show : false
10-22 20:52:22.501 3455-3455/? D/Launcher: onTrimMemory. Level: 20
10-22 20:52:22.631 3149-3149/? D/Recents: onTaskStackChanged
10-22 20:52:22.671 2137-2218/? I/SurfaceFlinger: id=739 Removed bgenda (5/8)
10-22 20:52:22.671 2137-3295/? I/SurfaceFlinger: id=739 Removed bgenda (-2/8)
10-22 20:52:22.691 2137-2137/? D/libEGL: eglTerminate EGLDisplay = 0xfff79034
10-22 20:52:23.081 2522-2522/? D/CustomFrequencyManagerService: releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT  frequency : 1300000  uid : 1000  pid : 2522  tag : ACTIVITY_RESUME_BOOSTER@10
10-22 20:52:23.081 2522-2522/? D/CustomFrequencyManagerService: FrequencyrequestList.getNextCStateDisableRequest, index: 1
10-22 20:52:23.611 2522-3475/? D/CustomFrequencyManagerService: releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT  frequency : 1500000  uid : 1000  pid : 2522  tag : LAUNCHER_APP_BOOSTER_CPU@7
10-22 20:52:23.671 2522-5131/? D/SSRM:s: SIOP:: AP = 320, PST = 310 (W:26), LCD = 30
10-22 20:52:23.671 2522-5131/? D/ConnectivityService: returning getNetworkInfo for network type 1 : [type: WIFI[] - WIFI, state: CONNECTED/CONNECTED, reason: (unspecified), extra: "Uaifai", roaming: false, failover: false, isAvailable: true]
10-22 20:52:23.781 2522-2532/? I/art: Background sticky concurrent mark sweep GC freed 143841(10MB) AllocSpace objects, 214(4MB) LOS objects, 29% free, 35MB/50MB, paused 3.521ms total 113.412ms
10-22 20:52:23.941 2137-2137/? D/libEGL: eglInitialize EGLDisplay = 0xfff78fbc
10-22 20:52:24.611 2522-3025/? W/System.err: remove failed: ENOENT (No such file or directory) : /data/system/recent_tasks/66_task.xml.bak
10-22 20:52:28.261 2522-3301/? E/Watchdog: !@Sync 977 [10-22 20:52:28.268]
10-22 20:52:29.671 14024-14073/? I/ReschedulableTimer: [#CMH#] ReschedulableTimer started 
10-22 20:52:32.381 2151-2899/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'LABEL' not found
10-22 20:52:32.381 2151-2899/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'UID' not found
10-22 20:52:33.711 2522-5131/? D/SSRM:s: SIOP:: AP = 310, PST = 310 (W:26), LCD = 30
10-22 20:52:33.711 2522-5131/? D/ConnectivityService: returning getNetworkInfo for network type 1 : [type: WIFI[] - WIFI, state: CONNECTED/CONNECTED, reason: (unspecified), extra: "Uaifai", roaming: false, failover: false, isAvailable: true]
solução!

Não consegui identificar onde estava o erro então criei o projeto todo do zero e funcionou, obrigado Vânia.