Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MainActivity.kt #28

Open
Achudh opened this issue Sep 28, 2021 · 4 comments
Open

MainActivity.kt #28

Achudh opened this issue Sep 28, 2021 · 4 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@Achudh
Copy link

Achudh commented Sep 28, 2021

package com.example.app

import io.flutter.embedding.android.FlutterActivity

class MainActivity: FlutterActivity() {
}

Need to change the package name in MainActivity.kt also.

I faced this issue when signing and building the app

@onatcipli
Copy link
Owner

I think this is not causing issue in my cases but It could be good to change also this one, if we change this one we also need to edit the folder names on android side since the package name will change

@onatcipli onatcipli self-assigned this Oct 7, 2021
@richardjharris
Copy link

This caused an issue for me, until I renamed the class name in MainActivity.kt:

E/AndroidRuntime(18457): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{io.github.richardjharris.JapaneseYearCalculator/io.github.richardjharris.JapaneseYearCalculator.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "io.github.richardjharris.JapaneseYearCalculator.MainActivity" on path: DexPathList[[zip file "/data/app/io.github.richardjharris.JapaneseYearCalculator-4bLXRdubbkTCHzWsETpAfQ==/base.apk"],nativeLibraryDirectories=[/data/app/io.github.richardjharris.JapaneseYearCalculator-4bLXRdubbkTCHzWsETpAfQ==/lib/arm64, /data/app/io.github.richardjharris.JapaneseYearCalculator-4bLXRdubbkTCHzWsETpAfQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64, /hw_product/lib64, /system/product/lib64, /prets/lib64]]

@onatcipli onatcipli added the help wanted Extra attention is needed label Jan 11, 2023
@kyeshmz
Copy link

kyeshmz commented Jul 11, 2023

This was the same for me, apparently it must be the same as the namespace under androidmanifestxml

@thaiquoctoanvn
Copy link

I come up with a work around for new reader. Just add this line package="${your_namespace}" to your manifest.xml, this issue will be resolved. For instance I have my namespace like in the attached image below

image

then my manifest.xml would be like this

image

If your project has already had that line, just make sure it is equal to the namespace of your project folder structure. Hope this work around help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants