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

TEST failure "Navigate between screens with Compose: Android Basics with Compose" #107

Open
alejaacevedo02 opened this issue Aug 13, 2024 · 0 comments

Comments

@alejaacevedo02
Copy link

URL of codelab

In which task and step of the codelab can this issue be found?
When creating the navigation test and trying to run it with my physical device or emulator I can't execute the tests.

Describe the problem
This is the stacktrace of the failed test run :
Unknown platform error occurred when running the UTP test suite. Please check logs for details.
java.lang.NullPointerException
at com.google.testing.platform.executor.SingleDeviceExecutor$execute$3.invoke(SingleDeviceExecutor.kt:101)
at com.google.testing.platform.executor.SingleDeviceExecutor$execute$3.invoke(SingleDeviceExecutor.kt:100)
at com.google.testing.platform.result.TestResultListenerManager.afterTestSuite(TestResultListenerManager.kt:139)
at com.google.testing.platform.executor.SingleDeviceExecutor.execute(SingleDeviceExecutor.kt:115)
at com.google.testing.platform.RunnerImpl.run(RunnerImpl.kt:117)
at com.google.testing.platform.server.strategy.NonInteractiveServerStrategy$run$5.invoke(NonInteractiveServerStrategy.kt:95)
at com.google.testing.platform.server.strategy.NonInteractiveServerStrategy$run$5.invoke(NonInteractiveServerStrategy.kt:94)
at com.google.testing.platform.core.telemetry.common.noop.NoopDiagnosticsScope.recordEvent(NoopDiagnosticsScope.kt:35)
at com.google.testing.platform.core.telemetry.TelemetryKt.recordEvent(Telemetry.kt:66)
at com.google.testing.platform.server.strategy.NonInteractiveServerStrategy.run(NonInteractiveServerStrategy.kt:94)
at com.google.testing.platform.main.MainKt$main$4.invokeSuspend(Main.kt:75)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:279)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at com.google.testing.platform.main.MainKt.main(Main.kt:73)
at com.google.testing.platform.main.MainKt.main$default(Main.kt:35)
at com.google.testing.platform.main.MainKt.main(Main.kt)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.google.testing.platform.launcher.Launcher.main(Launcher.java:149)

The only Solution I found was to use the following in gradle.properties :
"android.experimental.androidTest.useUnifiedTestPlatform=false"
however this is set to be deprecated as from gradle 9.0 so what is the real solution to this problem?

Steps to reproduce?

  1. Go to... CupcakeScreenNavigationTest.kt
  2. Click on... Run CupacakeScreeNavigationTest.kt
  3. See error... see the error I posted above in the failed gradle task

Versions
Android Studio version: Android Studio Koala 2024.1.1 Patch 1
API version of the emulator: Device Google Pixel 7

Additional information
Include screenshots if they would be useful in clarifying the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant