Dan
Dan

Reputation: 191

React-native on Android - cannot compile app

I followed all the instructions to setup Android but when I try to compile it complains it cannot find the modules required in DetoxTest.java

/Work/mine/detoxJestRn/android/app/src/main/java/com/detoxjestrn/DetoxTest.java:3: error: package android.support.test.filters does not exist
import android.support.test.filters.LargeTest;
                                   ^
/Work/mine/detoxJestRn/android/app/src/main/java/com/detoxjestrn/DetoxTest.java:4: error: package android.support.test.rule does not exist
import android.support.test.rule.ActivityTestRule;
                                ^`

Upvotes: 2

Views: 481

Answers (1)

Gianfranco P
Gianfranco P

Reputation: 10794

You need to add the DetoxTest.java file in the correct folder (androidTest).

For example:

$ find android/app/src -name '*.java'
android/app/src/androidTest/java/com/[your.package]/DetoxTest.java
android/app/src/main/java/com/onova/[your.package]/MainActivity.java
android/app/src/main/java/com/onova/[your.package]/MainApplication.java

Upvotes: 1

Related Questions