Addressed lint
warnings in the demo
project
#306
build.yaml
on: pull_request
Build
3m 50s
Validate Workflows
5s
Annotations
3 errors and 1 notice
shouldStart:
demo-project/app/src/test/java/com/example/myapplication/MainActivityTest.kt#L14
java.lang.IllegalStateException: Activity com.example.myapplication.MainActivity@3eaf6a7d does not have a NavController set on 2131231036
at androidx.navigation.Navigation.findNavController(Navigation.kt:50)
at androidx.navigation.ActivityKt.findNavController(Activity.kt:31)
at com.example.myapplication.MainActivity.onCreate(MainActivity.kt:25)
at android.app.Activity.performCreate(Activity.java:5933)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at org.robolectric.android.internal.RoboMonitoringInstrumentation.callActivityOnCreate(RoboMonitoringInstrumentation.java:382)
at org.robolectric.android.controller.ActivityController.lambda$create$0(ActivityController.java:138)
at org.robolectric.shadows.ShadowPausedLooper.runPaused(ShadowPausedLooper.java:243)
at org.robolectric.android.controller.ActivityController.create(ActivityController.java:136)
at org.robolectric.android.controller.ActivityController.create(ActivityController.java:146)
at org.robolectric.android.controller.ActivityController.setup(ActivityController.java:341)
at com.example.myapplication.MainActivityTest.shouldStart(MainActivityTest.kt:14)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.robolectric.RobolectricTestRunner$HelperTestRunner$1.evaluate(RobolectricTestRunner.java:489)
at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$2(SandboxTestRunner.java:291)
at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:104)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Suppressed: org.robolectric.android.internal.AndroidTestEnvironment$UnExecutedRunnablesException: Main looper has queued unexecuted runnables. This might be the cause of the test failure. You might need a shadowOf(Looper.getMainLooper()).idle() call.
|
shouldStart:
demo-project/app/src/test/java/com/example/myapplication/MainActivityTest.kt#L14
java.lang.IllegalStateException: Activity com.example.myapplication.MainActivity@2eb7fe69 does not have a NavController set on 2131231036
at androidx.navigation.Navigation.findNavController(Navigation.kt:50)
at androidx.navigation.ActivityKt.findNavController(Activity.kt:31)
at com.example.myapplication.MainActivity.onCreate(MainActivity.kt:25)
at android.app.Activity.performCreate(Activity.java:5933)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at org.robolectric.android.internal.RoboMonitoringInstrumentation.callActivityOnCreate(RoboMonitoringInstrumentation.java:382)
at org.robolectric.android.controller.ActivityController.lambda$create$0(ActivityController.java:138)
at org.robolectric.shadows.ShadowPausedLooper.runPaused(ShadowPausedLooper.java:243)
at org.robolectric.android.controller.ActivityController.create(ActivityController.java:136)
at org.robolectric.android.controller.ActivityController.create(ActivityController.java:146)
at org.robolectric.android.controller.ActivityController.setup(ActivityController.java:341)
at com.example.myapplication.MainActivityTest.shouldStart(MainActivityTest.kt:14)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.robolectric.RobolectricTestRunner$HelperTestRunner$1.evaluate(RobolectricTestRunner.java:489)
at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$2(SandboxTestRunner.java:291)
at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:104)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Suppressed: org.robolectric.android.internal.AndroidTestEnvironment$UnExecutedRunnablesException: Main looper has queued unexecuted runnables. This might be the cause of the test failure. You might need a shadowOf(Looper.getMainLooper()).idle() call.
|
Build
Process completed with exit code 1.
|
Build
Processed 10 files: 9 tests: ✅ 7 passed, ❌ 2 failed
|