Skip to content

[integration_test] readme about Android device testing out-of-date #62237

Description

@CareF

https://github.com/flutter/plugins/tree/master/packages/e2e#android-device-testing

Following this guide to a newly created (by flutter create) will result in fail:

+ ./gradlew app:assembleAndroidTest

> Task :app:compileDebugAndroidTestJavaWithJavac FAILED
/Users/minglyu/tmp/ftl_dev/android/app/src/androidTest/java/com/example/ftl_dev/MainActivityTest.java:11: error: cannot find symbo
  public ActivityTestRule<MainActivity> rule = new ActivityTestRule<>(MainActivity.class, true, false);
                          ^
  symbol:   class MainActivity
  location: class MainActivityTest
/Users/minglyu/tmp/ftl_dev/android/app/src/androidTest/java/com/example/ftl_dev/MainActivityTest.java:11: error: cannot find symbol
  public ActivityTestRule<MainActivity> rule = new ActivityTestRule<>(MainActivity.class, true, false);
                                                                      ^
  symbol:   class MainActivity
  location: class MainActivityTest
2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugAndroidTestJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.6.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 5s

It seems current flutter create is using kotlin but this guide is for java.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our testsd: examplesSample code and demosf: integration_testThe flutter/packages/integration_test pluginplatform-androidAndroid applications specificallyt: gradle"flutter build" and "flutter run" on Androidteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions