crashlyticsGenerateSymbolsRelease - GC overhead limit exceeded - google-fabric

about week ago we has been successfully integrate crashlytics in our cocos2d-x c++ project (ndk 14b). Everything looks fine, but about few days ago task crashlyticsUploadSymbolsRelease starts throw this error:
Execution failed for task ':woh:crashlyticsGenerateSymbolsRelease'.
> GC overhead limit exceeded
javaMaxHeapSize "4g", javaMaxHeapSize "16g", org.gradle.jvmargs=-Xmx4096m, and so on doesn't help us. But crashlyticsUploadSymbolsDebug is working fine:
:woh:assembleX86Debug
:woh:compileDebugSources
:woh:assembleDebug
:woh:crashlyticsGenerateSymbolsDebug
:woh:crashlyticsCacheSymbolsDebug
:woh:crashlyticsUploadSymbolsDebug
BUILD SUCCESSFUL
Total time: 5 mins 15.064 secs
What we are doing wrong?

They have just released Fabric Gradle Plugin 1.24.3, which is still in beta and causes this issue. Reverting to 1.24.2 solves it.
Check your build.gradle file and force the previous version:
dependencies {
classpath 'io.fabric.tools:gradle:1.24.2'
}
Source: https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin

Mike from Fabric here. Yep, we fixed the bug. Use version 1.24.4 to get the fix.

Related

Cannot run android with react-native-camera [duplicate]

This question already has answers here:
React Native Android build failure with different errors without any changes in code for past days due to publish of React Native version 0.71.0-rc.0
(4 answers)
Closed 3 months ago.
I can't run project when install this lib.
I got error:
What went wrong:
Execution failed for task ':react-native-camera:generateGeneralDebugRFile'.
Could not resolve all files for configuration ':react-native-camera:generalDebugCompileClasspath'.
Failed to transform react-native-0.71.0-rc.0-debug.aar (com.facebook.react:react-native:0.71.0-rc.0) to match attributes {artifactType=android-symbol-with-package-name, com.android.build.api.attributes.BuildTypeAttr=debug, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-api}.
> Execution failed for JetifyTransform: /Users/chien/.gradle/caches/modules-2/files-2.1/com.facebook.react/react-native/0.71.0-rc.0/7a7f5a0af6ebd8eb94f7e5f7495e9d9684b4f543/react-native-0.71.0-rc.0-debug.aar.
> Java heap space
I tried install by docs:
missingDimensionStrategy 'react-native-camera', 'general' <-- add this line in android/app/build.gradle
Some time ago I was still able to run my project normally. But since yesterday, I can't run anymore
Can anyone help me!
it is java heap space error, try increasing heap space by adding this to gradle.properties
org.gradle.jvmargs=-Xmx2g -XX\:MaxHeapSize\=4g

react native problem with creating apk: gradle mergeDexRelease

My app works well on react-native-run-android and on gradlew clean provide me build success.
I used to check and creating the apk by using gradlew assembleRelease.
Recently, I faced an error while trying to create the APK and I cant find the right solution.
as far as I understand, some problem with the build.gradle or any gradle settings - the last feature I put was the mauron background geolocation (im not sure if that cause the problem).
I tried:
on gradle.properties :
android.useAndroidX=true
android.enableJetifier=true
org.gradle.daemon=true
org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx4608m -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
in build.gradle I added: implementation 'androidx.multidex:multidex:2.0.1' in the dependencies.
3.
defaultConfig {
...
multiDexEnabled true
}
dexOptions {
incremental true
javaMaxHeapSize "4g"
// multiDexEnabled true
}
The gradle I used was 6.3. So I upgraded (downloaded from their website v7 but I think the project is still under 6.3).
My question is:
If the app works and build successfuly, was the error because of my code or the gradle settings?
Im over a week with that problem and out of any clue how to get it work.
the error I get:
> Task :app:mergeDexRelease FAILED
D8: Program type already present: org.apache.commons.io.Charsets
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Program type already present: org.apache.commons.io.Charsets
full picture: https://ibb.co/87pFnv1 , https://ibb.co/FxB8PWX
could anyone help me with it?
The error is not about multidex. It clearly says that one of your package is trying to add a library which is already there.
Since you have the name of the library you can put conditional implementation in your build.gradle to avoid redundant implementation.
for example
Implementation('new package that has module'){
exclude module: 'module to exclude'
}
Finally I solved the problem, Thanks Shashank Shekhar for directing me to the correct problem.
I used mauron85/react-native-background-geolocation package, was working fine until I tried to create apk.
in mauron85 issue #505 there was similar problem and someone fixed it by forking and maintaining the repo.
if anyone face that issue in future, I recommend to use #darron1217/react-native-background-geolocation as it solved the error.
Resolved: I have two packages #react-native-masked-view/masked-view (from previous developer) and #react-native-community/masked-view. Just remove #react-native-masked-view/masked-view package and try build.
https://github.com/react-native-masked-view/masked-view/issues/100#issuecomment-841634389 Thanks to: Navipro70

Strange error when upgrading play-services-auth from 15.0.0 to 16.0.1

For my android project I upgraded play-services-auth library version from 15.0.0 to 16.0.1
Since then I see following error during the build and it also produces
ajcore files
I have removed my .gradle caches and done build and still see this error.
Anybody else seen this before, how do I fix it?
java.lang.IllegalStateException: Expecting .,<, or ;, but found authapi while unpacking Lcom/google/android/gms/common/api/internal/BaseImplementation$ApiMethodImpl;
at org.aspectj.util.GenericSignatureParser.parseClassTypeSignature(GenericSignatureParser.java:204)
at org.aspectj.util.GenericSignatureParser.parseFieldTypeSignature(GenericSignatureParser.java:155)
at org.aspectj.util.GenericSignatureParser.parseTypeArgument(GenericSignatureParser.java:267)
In my case, removing the Hugo logging plugin fixed the issue.
Check in your gradle file if you have it configured.
classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
It happens because some plugin (added by you) use libs:
org.aspectj:aspectjtools
or
org.aspectj:aspectjrt for codegeneration

Spring Boot - Rest Controller fails after hot swap

I'm using Spring Boot 1.4.1 with devtools and run it within IntelliJ 14.1
All works nicely except the hot swap. My changes to the controllers are hot swapped and I can see the app being re-loaded. However, it results in an error and the controller become unavailable (404).
After I restart the app, all works fine again.
Any ideas what I'm doing wrong ?
Thank you in advance for your help
Edward
To answer my question, the problem is resolved by adding the following to the application.properties
## Amount of time (in milliseconds) to wait between polling for classpath changes.
spring.devtools.restart.poll-interval=3000
# Amount of quiet time (in milliseconds) required without any classpath changes before a restart is triggered.
spring.devtools.restart.quiet-period=2999

Trouble with jitpack/gradle in Intellij

I'm still getting started with gradle, but I found jitpack to allow for including dependencies across my github repos.
I'm having issues getting dependencies to resolve, though. Some releases work, but other times I get "could not resolve."
I have managed to reproduce this with a couple of github repos:
I set up a repo to be depended on: https://github.com/bdleitner/dummy-dependency
and one to depend on it: https://github.com/bdleitner/dummy-client
From jitpack, I can see the build log for the 0.1.3 release of dummy-dependency:
https://jitpack.io/com/github/bdleitner/dummy-dependency/0.1.3/build.log
where it seems that everything is successful.
when logged in to jitpack, it can see this release and provides the compile statement:
compile 'com.github.bdleitner:dummy-dependency:0.1.3'
but even when I include that in the gradle.build file for dummy-client,
I get:
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':compileClasspath'.
> Could not resolve com.github.bdleitner:dummy-dependency:0.1.3.
Required by:
com.bdl:dummy-client:1.0-SNAPSHOT
> No cached version of com.github.bdleitner:dummy-dependency:0.1.3 available for offline mode.
> No cached version of com.github.bdleitner:dummy-dependency:0.1.3 available for offline mode.
> No cached version of com.github.bdleitner:dummy-dependency:0.1.3 available for offline mode.
I figure I'm probably missing something small and dumb, but I haven't been able to find it.
Apparently, I somehow managed to switch my gradle settings to offline mode (not sure how)... but unchecking that option appears to have fixed the issue.
Sorry to bother everyone.