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

[Android] app crashed immediately after start #8

Open
RedTeaDev opened this issue Apr 2, 2023 · 0 comments
Open

[Android] app crashed immediately after start #8

RedTeaDev opened this issue Apr 2, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@RedTeaDev
Copy link
Member

RedTeaDev commented Apr 2, 2023

logcat output:

2023-04-03 02:12:10.641 6481-6481/dev.redcoke.hktransporteta E/AndroidRuntime: FATAL EXCEPTION: main
    Process: dev.redcoke.hktransporteta, PID: 6481
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{dev.redcoke.hktransporteta/io.redcoke.dev.redcoke.hktransporteta.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "io.redcoke.dev.redcoke.hktransporteta.MainActivity" on path: DexPathList[[zip file "/data/app/~~aubwQuoPBbGU4QuW39HwQw==/dev.redcoke.hktransporteta-4_t5Plu_M8sGbStRHZnWhA==/base.apk"],nativeLibraryDirectories=[/data/app/~~aubwQuoPBbGU4QuW39HwQw==/dev.redcoke.hktransporteta-4_t5Plu_M8sGbStRHZnWhA==/lib/x86_64, /system/lib64, /system_ext/lib64]]
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3582)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3813)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
        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:2308)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7898)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "io.redcoke.dev.redcoke.hktransporteta.MainActivity" on path: DexPathList[[zip file "/data/app/~~aubwQuoPBbGU4QuW39HwQw==/dev.redcoke.hktransporteta-4_t5Plu_M8sGbStRHZnWhA==/base.apk"],nativeLibraryDirectories=[/data/app/~~aubwQuoPBbGU4QuW39HwQw==/dev.redcoke.hktransporteta-4_t5Plu_M8sGbStRHZnWhA==/lib/x86_64, /system/lib64, /system_ext/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
        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 androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45)
        at android.app.Instrumentation.newActivity(Instrumentation.java:1328)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3569)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3813) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101) 
        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:2308) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loopOnce(Looper.java:201) 
        at android.os.Looper.loop(Looper.java:288) 
        at android.app.ActivityThread.main(ActivityThread.java:7898) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) 

input

steps to reproduce

  1. Enter command
❯ git clone https://github.com/RedCokeDevelopment/HKTransportETAApp.git
❯ pnpm install
❯ ionic serve
// The Site work fine
❯ ionic capacitor build android
> capacitor.cmd sync android
[capacitor] √ Copying web assets from build to android\app\src\main\assets\public in 335.19ms
[capacitor] √ Creating capacitor.config.json in android\app\src\main\assets in 1.87ms
[capacitor] √ copy android in 379.37ms
[capacitor] √ Updating Android plugins in 4.26ms
[capacitor] [info] Found 5 Capacitor plugins for android:
[capacitor]        @capacitor/[email protected]
[capacitor]        @capacitor/[email protected]
[capacitor]        @capacitor/[email protected]
[capacitor]        @capacitor/[email protected]
[capacitor]        @capacitor/[email protected]
[capacitor] √ update android in 77.44ms
[capacitor] [info] Sync finished in 0.46s

[INFO] Ready for use in your Native IDE!

       To continue, build your project using Android Studio!
  1. Open Android IDE, goto Build > APK
  2. Install the APK in the emulator
  3. Open logcat window (by opening Tool > Windows > logcat
  4. Start the app
  5. error
@RedTeaDev RedTeaDev added the bug Something isn't working label Apr 2, 2023
@RedTeaDev RedTeaDev pinned this issue Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant