Closed Vaib215 closed 9 months ago
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
unable to create a repro
The app works fine in release mode but fails in debug mode
same is happening with me
Did you check logs in Android Studio's Logcat? I often do that when Metro doesn't show any logs during crashes. 99.9% chance you will see some useful log in Logcat that explains why the app crashes.
Having the same issue after upgrade from 0.71.7. I followed all the instructions from https://react-native-community.github.io/upgrade-helper/?from=0.71.7&to=0.73.1
In Logcat I see this exception
java.lang.RuntimeException: Unable to instantiate application com.tst.MainApplication package com.tst: java.lang.ClassNotFoundException: Didn't find class "com.tst.MainApplication" on path: DexPathList
My AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Probably you missed something in MainApplication.java , probably a small typo. open this file in android studio for recheck , also check for typos in debug/AndroidManifest.xml
check you have already apply Kotlin plugin in app/gradle.build
apply plugin: "org.jetbrains.kotlin.android"
@Vaib215 We can't help without a repro or a log of any sort sadly.
@marijache Hello, did you fix this? I am getting the same crash and same error in logcat. Trying to update my rn version from 0.72.3 to 0.73.2
@marijache Hello, did you fix this? I am getting the same crash and same error in logcat. Trying to update my rn version from 0.72.3 to 0.73.2
I'm having the same issue, i upgraded to 0.73.2 from 0.72, upgraded the project to gradle 8.1.1.
My app build is Successfull but the app crash when i open it
I have the exact same issue. Upgraded to 0.73 and followed the upgrade diffs. Works fine on iOS and crashes immediately on launch with Android.
I have the exact same issue. Upgraded to 0.73 and followed the upgrade diffs. Works fine on iOS and crashes immediately on launch with Android.
I solved it. For anyone else looking for this I accidentally left the wrong package in the top of MainActivity.kt
You can take the logs from here and paste it into ChatGPT if you need more help.
adb logcat | grep com.yourpackage
check you have already apply Kotlin plugin in app/gradle.build
apply plugin: "org.jetbrains.kotlin.android"
Very thanks, this help me after upgrade RN 0.72-0.73, app build but crash on Android after start.
I solved it by commenting out this line: //ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
from MainApplication.java
Hey guys this might help someone else in future.
I faced this bug after upgrading from 0.72.x to 0.73.6.
in /SwarPay/MainActivity.kt
, you have to change the first line package com.rndiffapp
to your package name.
Hey guys this might help someone else in future. I faced this bug after upgrading from 0.72.x to 0.73.6. in
/SwarPay/MainActivity.kt
, you have to change the first linepackage com.rndiffapp
to your package name.
Also MainApplication.kt
Old Version
0.72.3
New Version
0.73.0
Description
I upgraded all the libraries in my app and now when i run it in debug mode, it crashes immediately without any error log.
Here is my
package.json
:Here is
build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { ext { buildToolsVersion = "33.0.0" minSdkVersion = 21 compileSdkVersion = 33 targetSdkVersion = 33 kotlinVersion = "1.8.0"
}
Steps to reproduce
Install dependencies Run the app
Affected Platforms
Runtime - Android, Build - MacOS
Output of
npx react-native info