In your `android/build.gradle` add this:
xxxxxxxxxx
buildscript {
ext {
kotlin_version = '1.6.10'
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
#Also you can try doing:
./android/gradlew -stop
```
xxxxxxxxxx
# FILE 1: Gradle.properties
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# FILE 2: app/build.gradle ( under android{} )
dexOptions {
incremental true
javaMaxHeapSize "4g"
}
xxxxxxxxxx
UNBELIEVABLE FIXED, seems to be a 63.x issue?
As there's another person solve this issue after
upgrading from 62.2 to 63.3
UPGRADE TO LATEST VERSION AVALIABLE
xxxxxxxxxx
org.gradle.daemon=true
org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
xxxxxxxxxx
Solved this issue by deleting the .gradle folder from <NameOfProject>/android
and again run npm run android, and it solved this error.