I'm using Android Studio 3.4 (Canary 9), when I build my app, it failed with the following error
Task :app:transformClassesAndResourcesWithR8ForDebug
R8 is an experimental feature. If you experience any issues, please file a bug at https://issuetracker.google.com, using 'Shrinker (R8)' as component name. You can disable R8 by updating gradle.properties with 'android.enableR8=false'.
AGPBI: {"kind":"warning","text":"Missing class: java.lang.instrument.ClassFileTransformer","sources":[{}],"tool":"D8"}
Task :app:transformClassesAndResourcesWithR8ForDebug FAILED
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':app:transformClassesAndResourcesWithR8ForDebug'.
GC overhead limit exceeded
When I disable R8 by putting android.enableR8=false
into gradle.properties. Everything is working fine.
So how can I fix this error without disable R8 Shrinker? Because I'm really want to test functionality of R8.
org.gradle.jvmargs
or do you use defaults? – Gunasorg.gradle.jvmargs=-XX\:MaxHeapSize\=1024m -Xmx4608M
for example, or more. Let's see if it solves. Let me know. – Gunas