Status Update
Comments
uc...@google.com <uc...@google.com>
ar...@google.com <ar...@google.com> #2
Is it possible to get a small repro project? Thanks.
me...@gmail.com <me...@gmail.com> #3
Sure. Let me try that and update.
za...@gmail.com <za...@gmail.com> #4
I'm seeing this as well with 4.1-rc01
I see this in the logs
08-20 03:09:50.052 1947-2101/system_process W/ActivityManager: Unable to find instrumentation info for: ComponentInfo{com.Slack.internal.debug.test/com.Slack.TestRunner}
and the output of adb shell pm list instrumentation
is
instrumentation:androidx.test.orchestrator/.AndroidTestOrchestrator (target=androidx.test.orchestrator)
instrumentation:com.Slack.test/com.Slack.TestRunner (target=com.Slack.internal.debug)
instrumentation:com.android.emulator.smoketests/android.support.test.runner.AndroidJUnitRunner (target=com.android.emulator.smoketests)
instrumentation:com.android.smoketest.tests/com.android.smoketest.SmokeTestRunner (target=com.android.smoketest)
instrumentation:com.example.android.apis/.app.LocalSampleInstrumentation (target=com.example.android.apis)
za...@gmail.com <za...@gmail.com> #5
In our case actually, it looks like studio is just running the wrong command and using the wrong applicationId for the test APK
adb shell am instrument -w -r -e clearPackageData true --no-window-animation -e debug false -e class 'com.Slack.ui.messagebottomsheet.MessageActionsSearchFragmentTest#testSearchAppShortcutShowsSameFilteredListOnRotation' com.Slack.internal.debug.test/com.Slack.TestRunner
za...@gmail.com <za...@gmail.com> #6
If I change the above command to use com.Slack.test
, it works. I checked on 4.0.1 and it's com.Slack.internal.debug.test
, so looks like this is a regression in AGP 4.1
ga...@google.com <ga...@google.com> #7
The package name for the androidTest APK is wrong. This issue looks related to
To reproduce, it is enough to add e.g
buildTypes {
debug {
applicationIdSuffix 'debug'
}
}
ga...@google.com <ga...@google.com> #8
In AGP 4.0.1 AndroidManifest.xml
in androidTest APK has package com.example.myapplication.debug.test
with target package com.example.myapplication.debug
, and the main APK has com.example.myapplication.debug
as package in the final AndroidManifest.xml
.
In 4.1 and 4.2 androidTest APK contains manifest with package name com.example.myapplication.test
.
In 4.0-4.2 the IDE uses $mainApplicationId.test
when invoking adb command. This causes issues in 4.1+.
ga...@google.com <ga...@google.com> #9
This will be fixed in AGP 4.2.0-alpha10 (change ag/I8c5f292148a14b39602072580d6386bddce89716).
AGP 4.1 final will also contain the fix.
ga...@google.com <ga...@google.com>
do...@revelo.com <do...@revelo.com> #10
me...@gmail.com <me...@gmail.com> #11
Looks like this fix didn't make it to AGP 4.1 RC2. Can we please make it to AGP 4.1 RC3 so that we can validate before the stable is out?
ga...@google.com <ga...@google.com> #12
4.1 RC 3 will contain the fix.
Description
IMPORTANT: Please readhttps://developer.android.com/studio/report-bugs.html carefully and supply
all required information.
Studio Build: AS 4.1 RC1 Version of Gradle Plugin: AGP 4.1 RC1 Version of Gradle: 6.5 OS: Mac
Steps to Reproduce:
Test running failed: Unable to find instrumentation info for: ComponentInfo{com.linkedin.android.flagshipdev.debug.test/com.linkedin.espresso.VoyagerRunner}
One difference I see in the outputs is we have output-metadata.json file generated with AGP 4.1 RC1 and output.json generated with AGP 4.0.