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

Android: package com.wix.detox does not exist even though it is added under dependencies #1366

Closed
rikardwissing opened this issue May 6, 2019 · 1 comment

Comments

@rikardwissing
Copy link

I've followed the instructions on https://github.com/wix/Detox/blob/master/docs/Introduction.Android.md

But when I am trying to build the project i get the following error:

/Users/rikardwissing/Documents/GitHub/ttmobile/android/app/src/main/java/com/teamtailor/DetoxTest.java:3: error: package com.wix.detox does not exist
import com.wix.detox.Detox;
                    ^
/Users/rikardwissing/Documents/GitHub/ttmobile/android/app/src/main/java/com/teamtailor/DetoxTest.java:5: error: package org.junit does not exist
import org.junit.Rule;
                ^
/Users/rikardwissing/Documents/GitHub/ttmobile/android/app/src/main/java/com/teamtailor/DetoxTest.java:6: error: package org.junit does not exist
import org.junit.Test;
                ^
/Users/rikardwissing/Documents/GitHub/ttmobile/android/app/src/main/java/com/teamtailor/DetoxTest.java:7: error: package org.junit.runner does not exist
import org.junit.runner.RunWith;
                       ^
/Users/rikardwissing/Documents/GitHub/ttmobile/android/app/src/main/java/com/teamtailor/DetoxTest.java:9: error: package androidx.test.ext.junit.runners does not exist
import androidx.test.ext.junit.runners.AndroidJUnit4;
 ...

I have added the following to my app build.gradle in the dependencies block:

    androidTestImplementation('com.wix:detox:+') { transitive = true }
    androidTestImplementation 'junit:junit:4.12'

My buildcommand is as follows:

cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..

It seems to me that androidTestImplementation is not including the modules in the project. If I change it to implementation it compiles as it should.

Any idea why androidTestImplementation does not work?

@support
Copy link

support bot commented May 6, 2019

We use the issue tracker exclusively for bug reports and feature requests. This issue appears to be a general usage or support question. Instead, please ask a question on Stack Overflow with the detox tag.

@support support bot closed this as completed May 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant