Error after updating package name (app does not run)

Asked

Viewed 39 times

0

I rename my package and after my application does not run anymore. I’ve updated the name on all the files that are required (Androidmanifest in debug, main and profile and Kotlin) but it doesn’t run at all. When I click on run it goes to the part Installing build app outputs apk app.apk... and then the splash screen of the app opens and closes quickly. The app gets "installed" (both in the emulator and on a real device) but when I try to open the splash screen opens and closes quickly again. What do I do?? I’m trying to solve this problem a week ago following some answers from here and unfortunately I can’t manage.

This is my flutter doctor (Flutter and Dart plugin are installed correctly, this is just a version bug)

inserir a descrição da imagem aqui

  • And have you seen Logcat’s bug log?

  • 2021-06-19 17:21:31.907 1962-1962/com.julis.app_vestibular E/AndroidRuntime: FATAL EXCEPTION: main
 Process: com.julis.app_vestibular, PID: 1962
 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.julis.app_vestibular/com.example.br.com.app_vestibular.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.br.com.app_vestibular.MainActivity" on path: DexPathList[[zip file "/data/app/com.julis.app_vestibular-Uwztbresaenu5ylr4zximg===/base.apk"],nativeLibraryDirectories=[/data/app/com.julis.app_vestibular-

  • appears the following error

  • Give a flutter clean to make sure it’s not cache, which I don’t think it is. But the error log itself is telling you that you haven’t changed everywhere you need to: com.julis.app_vestibular <> com.example.br.com.app_vestibular.

  • I had already given a flutter clean before to see if it worked, but it really isn’t that. Seeing this bug in the logcat looks like it’s something that hasn’t changed in Mainactivity, only when looking at the file it looks all right

  • To test for real in Android Studio, delete the device and recreate. See here how to do it. If it doesn’t work, there’s still something left to do in the app. See if this link helping

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.