1

Having an android library project working fine with AS 4.1.2.

Just installed Android studio (fox) 2020.3.1 patch 3 without change anything (except set the sdk jre to java 8, version 18.6.0_60, since the project is using JavaVersion.VERSION_1_8).

with new AS(fox) the build and run is fine, but the it has issue with unit test and coverage test.

  1. when run unit test, the test will pass but showing some error log:
Caused by: java.lang.IllegalStateException: Cannot process instrumented class com/push/NotificationManager. Please supply original non-instrumented classes.
  1. when try to run the coverage test, it can only do it through the Rnu xxxtest with coverage

enter image description here

not like in AS 4.1.2, it can run the coverage test from Gradle pane/tasks: enter image description here

also in AS 4.1.2 it could view the coverage test report in the build/report/jacoco folder:

enter image description here

While in new AS(fox) it fails a lot with test events were not not received enter image description here

and in new AS(fox), in the build/report folder, it could not find the jacoco folder for the result (the html file tells what is the coverage test result, i.e how is branches covered).

the related dependencies:

  • Gradle: classpath "com.android.tools.build:gradle:4.0.0" distributionUrl=https://services.gradle.org/distributions/gradle-6.8.3-bin.zip

  • test:
    classpath "org.jacoco:org.jacoco.core:0.8.1"

          testImplementation "junit:junit:4.12"
    
          testApi "org.robolectric:robolectric:4.3"
    

Question

  1. How to resolve the Please supply original non-instrumented classes error in AS (fox)?

  2. How to resolve the test events were not not received?

  3. Where is the jacoco coverage test result html, which shows the coverage percentage details?

lannyf
  • 9,865
  • 12
  • 70
  • 152

0 Answers0