Starting with Android Gradle plugin 3.6.0-alpha01, R.java is not generated any more, and R clasess are compiled separately from the rest of the sources to R.jar e.g. ./app/build/intermediates/compile_and_runtime_not_namespaced_r_class_jar/debug/R.jar.
This means that the RealmTransformer should be able to process project classes coming from both directories and jars. Looking at implementation of BuildTemplate.categorizeClassNames it seems that classes coming from jars are in not processed.
Related issue: https://issuetracker.google.com/130965921#comment14
Thanks. Yes, we should fix this.
I can reproduce with 3.6.0-alpha05 and the /examples/multiprocessExample
08-02 14:56:55.008 11742 11742 E AndroidRuntime: Process: io.realm.examples.realmmultiprocessexample, PID: 11742
08-02 14:56:55.008 11742 11742 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/appcompat/R$drawable;
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at android.support.v7.widget.k.<clinit>(:107)
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at android.support.v7.widget.k.a(:84)
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at android.support.v7.widget.v0.c(:85)
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at android.support.v7.app.f.<init>(:128)
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at android.support.v7.app.j.<init>(:149)
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at android.support.v7.app.h.<init>(:56)
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at android.support.v7.app.i.<init>(:31)
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at android.support.v7.app.g.<init>(:31)
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at android.support.v7.app.e.a(:198)
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at android.support.v7.app.e.a(:183)
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at android.support.v7.app.c.h(:519)
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at android.support.v7.app.c.onCreate(:70)
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at io.realm.examples.realmmultiprocessexample.MainActivity.onCreate(:60)
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7136)
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7127)
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
08-02 14:56:55.008 11742 11742 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeCallbacks(
Many of the other example projects seem to work fine though, which strikes me as a bit odd.
Problem was that the JAR files were not correctly copied to the output folders again which is why the transformer worked correctly, but the project crashes at runtime. This should be fixed in #6575
fixed by #6575
Most helpful comment
fixed by #6575