Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with Connected Android Test #87

Open
robertoaltieri opened this issue Apr 21, 2023 · 3 comments
Open

Issues with Connected Android Test #87

robertoaltieri opened this issue Apr 21, 2023 · 3 comments
Assignees
Labels
good first issue Good for newcomers WIP Issue is under analysis

Comments

@robertoaltieri
Copy link

This might be an issue with my environment.
I have checked out the latest version of master 0cc02b3.
When I run:

gradle --version

I get:


Gradle 7.5.1

Build time: 2022-08-05 21:17:56 UTC
Revision: d1daa0cbf1a0103000b71484e1dbfe096e095918>

Kotlin: 1.6.21
Groovy: 3.0.10
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 11.0.17 (Oracle Corporation 11.0.17+10-LTS-269)
OS: Mac OS X 13.2.1 x86_64

When I run:
./gradlew connectedAndroidTest

I get the error:

Duplicate class org.checkerframework.checker.compilermsgs.qual.CompilerMessageKey found in modules checker-3.1

If I try to run them from Android Studio, I get a different error

Unable to find explicit activity class {prieto.fernando.spacex.test/androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared ?

@ferPrieto
Copy link
Owner

Ok I'll have a look asap @robertoaltieri, thanks for the heads up

@robertoaltieri
Copy link
Author

robertoaltieri commented Apr 27, 2023

I deleted the ~/.gradle folder and now I get a different error.
To avoid issue with my environment I have forked your repo and added an action to run the tests. Now I get on the CI the same error that I get locally:

* What went wrong:
java.lang.StackOverflowError (no error message)

I see many errors like these ones:


prieto.fernando.spacex.presentation.screens.MainScreenKtTest > appNavigatesToLaunchesTabWhenSelected[test(AVD) - 13] FAILED 
	android.content.ActivityNotFoundException: Unable to find explicit activity class {prieto.fernando.spacex.test/androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>?
	at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2197)

prieto.fernando.spacex.presentation.screens.MainScreenKtTest > app_loads_dashboard_by_default[test(AVD) - 13] FAILED 
	android.content.ActivityNotFoundException: Unable to find explicit activity class {prieto.fernando.spacex.test/androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>?
	at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2197)

prieto.fernando.spacex.presentation.screens.MainScreenKtTest > bottom_tabs_displayed[test(AVD) - 13] FAILED 
	android.content.ActivityNotFoundException: Unable to find explicit activity class {prieto.fernando.spacex.test/androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>?
	at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2197)

If you want I can make a PR to show it to you

@robertoaltieri
Copy link
Author

BTW if I run it in Android studio I get an error because the test is trying to set the content again after the activity has already done it

@ferPrieto ferPrieto added the good first issue Good for newcomers label Jan 23, 2024
@ferPrieto ferPrieto self-assigned this Jan 23, 2024
@ferPrieto ferPrieto added the WIP Issue is under analysis label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers WIP Issue is under analysis
Projects
None yet
Development

No branches or pull requests

2 participants