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

Crash logo na criação do projeto

O app nem abre, simplesmente da Crash

Segue Activity

package alura.com.aluraviagens.ui.activity;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import alura.com.aluraviagens.R;

public class ListaPacotesActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_lista_pacotes);
    }
}

E o XML

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".ui.activity.ListaPacotesActivity">

</android.support.constraint.ConstraintLayout>
2 respostas

LogCat

---------------------------- PROCESS STARTED (21812) for package alura.com.aluraviagens ----------------------------
12:07:16.431  D  No Network Security Config specified, using platform default
12:07:16.431  D  No Network Security Config specified, using platform default
12:07:16.449  D  loaded /vendor/lib/egl/libEGL_emulation.so
12:07:16.449  D  Shutting down VM
12:07:16.452  E  FATAL EXCEPTION: main
                 Process: alura.com.aluraviagens, PID: 21812
                 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{alura.com.aluraviagens/alura.com.aluraviagens.ListaPacotesActivity}: java.lang.ClassNotFoundException: Didn't find class "alura.com.aluraviagens.ListaPacotesActivity" on path: DexPathList[[zip file "/data/app/~~0-ILWPbjxepCjx-aGpGjsA==/alura.com.aluraviagens-5hUhaaNonjtF4Z4aOnXd4w==/base.apk"],nativeLibraryDirectories=[/data/app/~~0-ILWPbjxepCjx-aGpGjsA==/alura.com.aluraviagens-5hUhaaNonjtF4Z4aOnXd4w==/lib/x86, /system/lib, /system_ext/lib]]
                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3365)
                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
                     at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
                     at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
                     at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
                     at android.os.Handler.dispatchMessage(Handler.java:106)
                     at android.os.Looper.loop(Looper.java:223)
                     at android.app.ActivityThread.main(ActivityThread.java:7656)
                     at java.lang.reflect.Method.invoke(Native Method)
                     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
                 Caused by: java.lang.ClassNotFoundException: Didn't find class "alura.com.aluraviagens.ListaPacotesActivity" on path: DexPathList[[zip file "/data/app/~~0-ILWPbjxepCjx-aGpGjsA==/alura.com.aluraviagens-5hUhaaNonjtF4Z4aOnXd4w==/base.apk"],nativeLibraryDirectories=[/data/app/~~0-ILWPbjxepCjx-aGpGjsA==/alura.com.aluraviagens-5hUhaaNonjtF4Z4aOnXd4w==/lib/x86, /system/lib, /system_ext/lib]]
                     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
                     at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
                     at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
                     at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
                     at android.support.v4.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:43)
                     at android.app.Instrumentation.newActivity(Instrumentation.java:1253)
                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3353)
                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601) 
                     at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) 
                     at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
                     at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066) 
                     at android.os.Handler.dispatchMessage(Handler.java:106) 
                     at android.os.Looper.loop(Looper.java:223) 
                     at android.app.ActivityThread.main(ActivityThread.java:7656) 
                     at java.lang.reflect.Method.invoke(Native Method) 
                     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
12:07:16.459  D  loaded /vendor/lib/egl/libGLESv1_CM_emulation.so
12:07:16.461  D  loaded /vendor/lib/egl/libGLESv2_emulation.so
12:11:45.181  I  Sending signal. PID: 21812 SIG: 9
---------------------------- PROCESS ENDED (21812) for package alura.com.aluraviagens ----------------------------
solução!

O que estava causando o problema era o seguinte:

Criei o novo projeto em API 28, e estava executando o emulador com API 30.

Deletei o Pixel 4 API 30 e reinstalei com API 28

Deletei e recriei o projeto.

Solucionado o problema!