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

error while running detox build -c android.emu.debug Task :app:compileDebugJavaWithJavac FAILED; error: package com.facebook.hermes.reactexecutor does not exist #1663

Closed
rogerdribeiro opened this issue Sep 19, 2019 · 1 comment

Comments

@rogerdribeiro
Copy link


react native : 0.60.5
detox: 14.3.2

I am following the detox installation guide, and got the following error while running detox build -c android.emu.debug

❯ detox build -c android.emu.debug
detox[18075] INFO: [build.js] cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..

Task :app:generatePackageList
Task :app:preBuild
Task :app:preDebugBuild UP-TO-DATE
Task :app:compileDebugAidl NO-SOURCE
Task :app:checkDebugManifest UP-TO-DATE
Task :app:generateDebugBuildConfig UP-TO-DATE
Task :app:bundleDebugJsAndAssets SKIPPED
Task :app:prepareLintJar UP-TO-DATE
Task :app:javaPreCompileDebug UP-TO-DATE
Task :app:compileDebugRenderscript NO-SOURCE
Task :app:generateDebugSources UP-TO-DATE
Task :app:mainApkListPersistenceDebug UP-TO-DATE
Task :app:generateDebugResValues UP-TO-DATE
Task :app:generateDebugResources UP-TO-DATE
Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
Task :app:processDebugManifest UP-TO-DATE
Task :app:mergeDebugResources UP-TO-DATE
Task :app:processDebugResources UP-TO-DATE

Task :app:compileDebugJavaWithJavac FAILED
/home/rogerd/dev/test_detox/android/app/src/main/java/com/test_detox/MainApplication.java:7: error: package com.facebook.hermes.reactexecutor does not exist
import com.facebook.hermes.reactexecutor.HermesExecutorFactory;
^
/home/rogerd/dev/test_detox/android/app/src/main/java/com/test_detox/MainApplication.java:8: error: cannot find symbol
import com.facebook.react.bridge.JavaScriptExecutorFactory;
^
symbol: class JavaScriptExecutorFactory
location: package com.facebook.react.bridge
/home/rogerd/dev/test_detox/android/app/src/main/java/com/test_detox/MainApplication.java:9: error: cannot find symbol
import com.facebook.react.ReactApplication;
^
symbol: class ReactApplication
location: package com.facebook.react
/home/rogerd/dev/test_detox/android/app/src/main/java/com/test_detox/MainApplication.java:10: error: cannot find symbol
import com.facebook.react.ReactNativeHost;
^
symbol: class ReactNativeHost
location: package com.facebook.react
/home/rogerd/dev/test_detox/android/app/src/main/java/com/test_detox/MainApplication.java:16: error: cannot find symbol
public class MainApplication extends Application implements ReactApplication {
^
symbol: class ReactApplication
/home/rogerd/dev/test_detox/android/app/src/main/java/com/test_detox/MainApplication.java:18: error: cannot find symbol
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
^
symbol: class ReactNativeHost
location: class MainApplication
/home/rogerd/dev/test_detox/android/app/src/main/java/com/test_detox/MainApplication.java:40: error: cannot find symbol
public ReactNativeHost getReactNativeHost() {
^
symbol: class ReactNativeHost
location: class MainApplication
/home/rogerd/dev/test_detox/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:17: error: cannot find symbol
private ReactNativeHost reactNativeHost;
^
symbol: class ReactNativeHost
location: class PackageList
/home/rogerd/dev/test_detox/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:18: error: cannot find symbol
public PackageList(ReactNativeHost reactNativeHost) {
^
symbol: class ReactNativeHost
location: class PackageList
/home/rogerd/dev/test_detox/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:27: error: cannot find symbol
private ReactNativeHost getReactNativeHost() {
^
symbol: class ReactNativeHost
location: class PackageList
/home/rogerd/dev/test_detox/android/app/src/main/java/com/test_detox/MainActivity.java:5: error: MainActivity is not abstract and does not override abstract method getPackages() in ReactActivity
public class MainActivity extends ReactActivity {
^
/home/rogerd/dev/test_detox/android/app/src/main/java/com/test_detox/MainApplication.java:18: error: cannot find symbol
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
^
symbol: class ReactNativeHost
location: class MainApplication
/home/rogerd/dev/test_detox/android/app/src/main/java/com/test_detox/MainApplication.java:39: error: method does not override or implement a method from a supertype
@OverRide
^

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:compileDebugJavaWithJavac'.

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.4.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1s
13 actionable tasks: 2 executed, 11 up-to-date
detox[18075] ERROR: [cli.js] Error: Command failed: cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..


Does anyone know how to solve?

@support
Copy link

support bot commented Sep 19, 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.

Feel free to post your Stack Overflow question here for more visility. We'll take a look at it.

For issues with Expo apps, it is most likely not an issue with Detox itself, but with the Expo runtime or with incorrect Detox setup. For support on how to use Detox with Expo, you should contact the Expo team or the Expo community.

For more information on bots in this reporsitory, read this discussion.

@support support bot closed this as completed Sep 19, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Sep 22, 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