0

So im trying to figure out why my app does not work for the past 4 hours and i have still no idea why :(.

When opening app it just crashes on my emulator.

Any help will be appreciated! Thank you

 E/AndroidRuntime(11780): FATAL EXCEPTION: main
E/AndroidRuntime(11780): Process: com.journalq.todoey_flutter, PID: 11780
E/AndroidRuntime(11780): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.journalq.todoey_flutter/com.journalq.todoey_flutter.journalquestion}: java.lang.ClassNotFoundException: Didn't find class "com.journalq.todoey_flutter.journalquestion" on path: DexPathList[[zip file "/data/app/~~xFI8S-8ieQSNoEminTot9Q==/com.journalq.todoey_flutter-XhDsDOk_4PnlP78EiAyARw==/base.apk"],nativeLibraryDirectories=[/data/app/~~xFI8S-8ieQSNoEminTot9Q==/com.journalq.todoey_flutter-XhDsDOk_4PnlP78EiAyARw==/lib/x86, /data/app/~~xFI8S-8ieQSNoEminTot9Q==/com.journalq.todoey_flutter-XhDsDOk_4PnlP78EiAyARw==/base.apk!/lib/x86, /system/lib, /system_ext/lib]]
E/AndroidRuntime(11780):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3365)
E/AndroidRuntime(11780):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
E/AndroidRuntime(11780):    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
E/AndroidRuntime(11780):    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
E/AndroidRuntime(11780):    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
E/AndroidRuntime(11780):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
E/AndroidRuntime(11780):    at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(11780):    at android.os.Looper.loop(Looper.java:223)
E/AndroidRuntime(11780):    at android.app.ActivityThread.main(ActivityThread.java:7656)
E/AndroidRuntime(11780):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(11780):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/AndroidRuntime(11780):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
E/AndroidRuntime(11780): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.journalq.todoey_flutter.journalquestion" on path: DexPathList[[zip file "/data/app/~~xFI8S-8ieQSNoEminTot9Q==/com.journalq.todoey_flutter-XhDsDOk_4PnlP78EiAyARw==/base.apk"],nativeLibraryDirectories=[/data/app/~~xFI8S-8ieQSNoEminTot9Q==/com.journalq.todoey_flutter-XhDsDOk_4PnlP78EiAyARw==/lib/x86, /data/app/~~xFI8S-8ieQSNoEminTot9Q==/com.journalq.todoey_flutter-XhDsDOk_4PnlP78EiAyARw==/base.apk!/lib/x86, /system/lib, /system_ext/lib]]
E/AndroidRuntime(11780):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
E/AndroidRuntime(11780):    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
E/AndroidRuntime(11780):    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/AndroidRuntime(11780):    at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
E/AndroidRuntime(11780):    at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:41)
E/AndroidRuntime(11780):    at android.app.Instrumentation.newActivity(Instrumentation.java:1253)
E/AndroidRuntime(11780):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3353)
E/AndroidRuntime(11780):    ... 11 more



    import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'animation_screen.dart';
import 'example_start_screen.dart';
import 'services/storage.dart';
import 'package:journalquestion/models/task_data.dart';

void main() {
  Storage();
  TaskData();
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
        overlays: [SystemUiOverlay.bottom]);
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Journal Question',
      theme: ThemeData(
        canvasColor: Color(0xff5d6592),
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Material(
        child: Stack(children: <Widget>[
      Scaffold(body: ExampleStartScreen()),
      IgnorePointer(
          child: AnimationScreen(
        color: Color(0xff5d6592),
      ))
    ]));
  }
}

Here is the main file code that i have added so there is a little bit more details on the issue that i cannot resolve

i3arty
  • 71
  • 2
  • 9

1 Answers1

0

The problem was that i changed package name and probably not in the right way. So what i did, i used back up, and just copied the new app code (That didn't work) into an older app that did work, and then i changed the name in the terminal and it all works!

i3arty
  • 71
  • 2
  • 9