2

After I did an upgrade from Android Studio 3.5.1 to 4.0, I can't run any Espresso test, giving me following exception on the run window:

Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: Running Instrumented Tests for Dynamic Features is currently not supported on API < 21.
Jamil Rahman
  • 345
  • 1
  • 6
  • 18
  • Possible workaround: https://stackoverflow.com/questions/58611149/how-to-start-an-activity-in-a-dynamic-feature-module – Martin Zeitler Jun 11 '20 at 23:40
  • BTW, the app it self is building and running without any issue, the exception is only thrown when an Espresso test cases is being run – Jamil Rahman Jun 12 '20 at 13:24
  • Once down graded from 4.0 to 3.6.3 all test are working as expected. AS version 4.0 was not working for me, all kind of test (unit test, instrumentation test and Espresso test) were failing due to the the same exception above. – Jamil Rahman Jun 17 '20 at 20:28
  • There might be something else wrong; my tests work as always (at least without DFM). DFM seems to be setup incorrectly, because this is exactly what the error message hints for. Or there is indeed a bug with testing DFM. Have you tried the above workaround for testing DFM? – Martin Zeitler Jun 18 '20 at 01:03
  • Had the same issue too, glad to say it's been fixed in AS 4.0.1 – Mofe Ejegi Jul 28 '20 at 01:21

0 Answers0