React Native - Java.lang.StackOverflowError, React Native: Execution failed for task ':app:checkDebugDuplicateClasses'

dongwookim·2024년 6월 2일
0


Firebase 연동 끝나고 나서 실행 하는 순간 위와 같은 문제가 발생했다;
덤) :app:checkDebugDuplicateClasses 문제도 발생; @_@

첫번째 방법

Java.lang.StackOverflowError 해결방법
node_modules 폴더 삭제 > npm or yarn install > cd android > gradlew clean

  • 추가로
org.gradle.jvmargs=-Xmx2048m -Xms2048m -XX:ThreadStackSize=4096 -XX:CompilerThreadStackSize=4096

두번째 방법

:app:checkDebugDuplicateClasses 해결방법

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation 'com.android.support:multidex:2.0.1'
    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"

    // Add this line here
    implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.0')

    //...omit some code
}

코틀린이 업데이트를 해서 그런다고 한다 -_-;; Add this line here에 있는 코드를 넣으면 끝

첫번째 출처: https://www.google.co.kr/search?q=react+native+java.lang.stackoverflowerror+%28no+error+message%29&sca_esv=827dd578e192344c&sxsrf=ADLYWIKesJallATApxbIMujrmHLubO6bdQ%3A1717257220427&source=hp&ei=BERbZoDGF4mu0-kPkcmn8QY&iflsig=AL9hbdgAAAAAZltSFLEtvufBrGNSdXVn-_6l3HOs48c2&udm=&oq=react+native+java.lang.stack&gs_lp=Egdnd3Mtd2l6IhxyZWFjdCBuYXRpdmUgamF2YS5sYW5nLnN0YWNrKgIIADIHEAAYgAQYEzIIEAAYExgIGB4yCBAAGIAEGKIEMggQABiABBiiBDIIEAAYgAQYogQyCBAAGIAEGKIEMggQABiABBiiBEiIUFAAWJNAcAJ4AJABAJgBmQGgAcwbqgEEMC4zMLgBA8gBAPgBAZgCIKACkBzCAgoQIxiABBgnGIoFwgIEECMYJ8ICBRAAGIAEwgIKEAAYgAQYQxiKBcICCBAAGIAEGLEDwgIOEC4YgAQYsQMY0QMYxwHCAgsQLhiABBixAxiDAcICBBAAGB7CAgYQABgIGB7CAgUQIRigAZgDAJIHBDIuMzCgB6n4AQ&sclient=gws-wiz#fpstate=ive&vld=cid:6fa6e278,vid:BqczsivHYOk,st:0

https://stackoverflow.com/questions/71740807/gradle-7-stackoverflowerror-when-building/71796288#71796288

두번째 출처: https://stackoverflow.com/questions/75251151/react-native-execution-failed-for-task-appcheckdebugduplicateclasses

profile
Practice makes perfect

0개의 댓글