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

HelloWorld can't run the testing #15

Open
icools opened this issue May 21, 2021 · 1 comment
Open

HelloWorld can't run the testing #15

icools opened this issue May 21, 2021 · 1 comment

Comments

@icools
Copy link

icools commented May 21, 2021

In the Helloworld sample testing , gralde did not include the

testImplementation"androidx.car.app:app-testing:1.0.0-alpha01"

https://developer.android.com/reference/kotlin/androidx/car/app/testing/package-summary

or declare any testing define in the hello world build.gradle

also missing robolectric / junit and others

the car testing can't run.

@icools
Copy link
Author

icools commented May 21, 2021

maybe HelloWorld gradle is

`android {
compileSdkVersion 29

defaultConfig {
    applicationId "androidx.car.app.samples.helloworld"
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    minSdkVersion 23
    targetSdkVersion 29
    versionCode 1
    versionName "1.0"
}

compileOptions {
    targetCompatibility = JavaVersion.VERSION_1_8
    sourceCompatibility = JavaVersion.VERSION_1_8
}

}

dependencies {
implementation "androidx.car.app:app:1.0.0"
testImplementation 'junit:junit:4.13.2'
testImplementation "androidx.car.app:app-testing:1.0.0-alpha01"
testImplementation 'androidx.test:runner:1.3.0'
testImplementation "org.robolectric:robolectric:4.4"
testImplementation "androidx.test:core:1.3.0"
testImplementation "com.google.truth:truth:1.0"
androidTestImplementation "com.google.truth:truth::0.40"
}
`

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