Error:
Issue details
We found an issue in the following area(s):
Version code 25: In-app experience: "java.lang.ClassNotFoundException: Didn't find class "com.cotocus.motoshare.MainActivity" on path: DexPathList"
Solution:
Step 1: Check the MainActivity
Class
Ensure the MainActivity
class exists:
- Navigate to the
C:\Users\dharm\AndroidStudioProjects\motoshare\android\app\src\main\kotlin\com\example\motoshare\MainActivity.kt
directory and make sure there isMainActivity.kt
file.
Step 2: Check the AndroidManifest.xml
Verify the activity declaration:
- Open the
AndroidManifest.xml
file located in theandroid/app/src/main
directory. - Ensure that
MainActivity
is correctly declared inside the<application>
tag:
MainActivity.kt
and AndroidManifest.xml
the package name in the same
package="com.example.cotocus.motoshare
Step 3: Check the Build Configuration
flutter pub get
flutter clean
flutter build apk --target-platform android-arm,android-arm64 --split-per-abi