joltup / react-native-threads

Create new JS processes for CPU intensive work
MIT License
756 stars 142 forks source link

Execution failed for task ':react-native-threads:compileDebugJavaWithJavac' #63

Closed SokWonJeremyKim closed 5 years ago

SokWonJeremyKim commented 5 years ago

Project setting

"react-native": "0.57.7" "react-native-threads": "0.0.16"

Root project gradle setting

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        // Add jitpack repository (added by react-native-spinkit)
        mavenLocal()
        google()
        maven {
            url 'https://maven.google.com/'
        }
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        maven { url "https://jitpack.io" }
    }
    // buildDir = "C:/tmp/ArchisketchBuild"
}

ext {
    buildToolsVersion = "28.0.3"
    minSdkVersion = 26
    compileSdkVersion = 28
    targetSdkVersion = 28
    supportLibVersion = "28.0.0"
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

task wrapper(type: Wrapper) {
    gradleVersion = '4.6'
    distributionUrl = distributionUrl.replace("bin", "all")
}

Error Log (on running debug build)

15:10:23.826 [INFO] [org.gradle.api.internal.file.collections.DirectoryFileTree] file or directory '/Users/archidraw/Documents/workspace/Jerry/APP-archisketch/node_modules/react-native-threads/android/src/debug/java', not found
15:10:23.827 [INFO] [org.gradle.api.internal.file.collections.DirectoryFileTree] file or directory '/Users/archidraw/Documents/workspace/Jerry/APP-archisketch/node_modules/react-native-threads/android/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out', not found
15:10:23.829 [DEBUG] [org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler] Compiler arguments: -source 1.7 -target 1.7 -d /Users/archidraw/Documents/workspace/Jerry/APP-archisketch/node_modules/react-native-threads/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes -encoding UTF-8 -bootclasspath /Users/archidraw/Library/Android/sdk/platforms/android-28/android.jar:/Users/archidraw/Library/Android/sdk/build-tools/28.0.3/core-lambda-stubs.jar -s /Users/archidraw/Documents/workspace/Jerry/APP-archisketch/node_modules/react-native-threads/android/build/generated/source/apt/debug -g -sourcepath  -proc:none -XDuseUnsharedTable=true -classpath /Users/archidraw/.gradle/caches/transforms-1/files-1.1/react-native-0.57.7.aar/ff0c9480018d60b6759b31632becba47/jars/classes.jar:/Users/archidraw/.gradle/caches/modules-2/files-2.1/com.facebook.infer.annotation/infer-annotation/0.11.2/f514ff4ca022a579d9cf7524846988b646ae4491/infer-annotation-0.11.2.jar:/Users/archidraw/.gradle/caches/modules-2/files-2.1/javax.inject/javax.inject/1/6975da39a7040257bd51d21a231b76c915872d38/javax.inject-1.jar:/Users/archidraw/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/8aca6f0074b449ecec0403d13f72f1fb/jars/classes.jar:/Users/archidraw/.gradle/caches/transforms-1/files-1.1/fresco-1.10.0.aar/ed141ba8f98be5fafdc9bce6810abd87/jars/classes.jar:/Users/archidraw/.gradle/caches/transforms-1/files-1.1/imagepipeline-okhttp3-1.10.0.aar/d04882a3a48a7c3492a2fa39da50ce36/jars/classes.jar:/Users/archidraw/.gradle/caches/transforms-1/files-1.1/drawee-1.10.0.aar/2e299005b0e6e7d9065390b7409897d7/jars/classes.jar:/Users/archidraw/.gradle/caches/transforms-1/files-1.1/imagepipeline-1.10.0.aar/a4c4121b114a66047b887d5c9b986c33/jars/classes.jar:/Users/archidraw/.gradle/caches/transforms-1/files-1.1/imagepipeline-base-1.10.0.aar/2bb7b7867d3b988a918b1e902b5d7e39/jars/classes.jar:/Users/archidraw/.gradle/caches/transforms-1/files-1.1/soloader-0.5.1.aar/94701a66bff78e211e8f978633836600/jars/classes.jar:/Users/archidraw/.gradle/caches/modules-2/files-2.1/com.google.code.findbugs/jsr305/3.0.2/25ea2e8b0c338a877313bd4672d3fe056ea78f0d/jsr305-3.0.2.jar:/Users/archidraw/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp-urlconnection/3.11.0/54ec442e9c0fac51265110cf0cb44dfe5ad1ea05/okhttp-urlconnection-3.11.0.jar:/Users/archidraw/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/3.11.0/75966e05a49046ca2ae734e5626f28837a8d1e82/okhttp-3.11.0.jar:/Users/archidraw/.gradle/caches/modules-2/files-2.1/com.squareup.okio/okio/1.14.0/102d7be47241d781ef95f1581d414b0943053130/okio-1.14.0.jar:/Users/archidraw/.gradle/caches/transforms-1/files-1.1/android-jsc-r174650.aar/b4f9ae872e96d0b7c4cec9cdb72b5176/jars/classes.jar:/Users/archidraw/.gradle/caches/transforms-1/files-1.1/support-fragment-27.1.1.aar/9fc01dd3e8ee08c938bd8db5ac34de17/jars/classes.jar:/Users/archidraw/.gradle/caches/transforms-1/files-1.1/animated-vector-drawable-27.1.1.aar/28d47cc12ba1a7dd3a1b7a26d72e350e/jars/classes.jar:/Users/archidraw/.gradle/caches/transforms-1/files-1.1/support-core-ui-27.1.1.aar/eeb67400df86cf28a12bc67a992c12dd/jars/classes.jar:/Users/archidraw/.gradle/caches/transforms-1/files-1.1/support-core-utils-27.1.1.aar/d3c28f096855a9213c9da89f61c29825/jars/classes.jar:/Users/archidraw/.gradle/caches/transforms-1/files-1.1/support-vector-drawable-27.1.1.aar/74cee5e0fa3ba1ba1d0c906104f355d6/jars/classes.jar:/Users/archidraw/.gradle/caches/transforms-1/files-1.1/support-compat-27.1.1.aar/e617e190d9f8fdede723a32420abec36/jars/classes.jar:/Users/archidraw/.gradle/caches/modules-2/files-2.1/com.android.support/support-annotations/27.1.1/39ded76b5e1ce1c5b2688e1d25cdc20ecee32007/support-annotations-27.1.1.jar:/Users/archidraw/.gradle/caches/transforms-1/files-1.1/fbcore-1.10.0.aar/1f9bbd7060af04db34be56c7fceea7f8/jars/classes.jar:/Users/archidraw/.gradle/caches/transforms-1/files-1.1/livedata-core-1.1.0.aar/de88dd6880386bd043d28eee84acf824/jars/classes.jar:/Users/archidraw/.gradle/caches/transforms-1/files-1.1/viewmodel-1.1.0.aar/798b31e38200623b6189480d8c3b897b/jars/classes.jar:/Users/archidraw/.gradle/caches/modules-2/files-2.1/com.parse.bolts/bolts-tasks/1.4.0/d85884acf6810a3bbbecb587f239005cbc846dc4/bolts-tasks-1.4.0.jar:/Users/archidraw/.gradle/caches/transforms-1/files-1.1/runtime-1.1.0.aar/3bce3c08856ba23feb11c8104d75fc4b/jars/classes.jar:/Users/archidraw/.gradle/caches/modules-2/files-2.1/android.arch.lifecycle/common/1.1.0/edf3f7bfb84a7521d0599efa3b0113a0ee90f85/common-1.1.0.jar:/Users/archidraw/.gradle/caches/transforms-1/files-1.1/runtime-1.1.0.aar/4764e14eb413a7c91aef74df519dd142/jars/classes.jar:/Users/archidraw/.gradle/caches/modules-2/files-2.1/android.arch.core/common/1.1.0/8007981f7d7540d89cd18471b8e5dcd2b4f99167/common-1.1.0.jar:/Users/archidraw/Documents/workspace/Jerry/APP-archisketch/node_modules/react-native-threads/android/build/intermediates/compile_only_not_namespaced_r_class_jar/debug/generateDebugRFile/R.jar /Users/archidraw/Documents/workspace/Jerry/APP-archisketch/node_modules/react-native-threads/android/src/main/java/com/reactlibrary/RNThreadPackage.java /Users/archidraw/Documents/workspace/Jerry/APP-archisketch/node_modules/react-native-threads/android/src/main/java/com/reactlibrary/RNThreadModule.java /Users/archidraw/Documents/workspace/Jerry/APP-archisketch/node_modules/react-native-threads/android/src/main/java/com/reactlibrary/ThreadSelfModule.java /Users/archidraw/Documents/workspace/Jerry/APP-archisketch/node_modules/react-native-threads/android/src/main/java/com/reactlibrary/UIManagerStubModule.java /Users/archidraw/Documents/workspace/Jerry/APP-archisketch/node_modules/react-native-threads/android/src/main/java/com/reactlibrary/JSThread.java /Users/archidraw/Documents/workspace/Jerry/APP-archisketch/node_modules/react-native-threads/android/src/main/java/com/reactlibrary/ThreadBaseReactPackage.java /Users/archidraw/Documents/workspace/Jerry/APP-archisketch/node_modules/react-native-threads/android/src/main/java/com/reactlibrary/ReactContextBuilder.java /Users/archidraw/Documents/workspace/Jerry/APP-archisketch/node_modules/react-native-threads/android/build/generated/source/buildConfig/debug/com/reactlibrary/BuildConfig.java
15:10:23.829 [INFO] [org.gradle.api.internal.tasks.compile.JdkJavaCompiler] Compiling with JDK Java compiler API.
15:10:24.181 [ERROR] [system.err] /Users/archidraw/Documents/workspace/Jerry/APP-archisketch/node_modules/react-native-threads/android/src/main/java/com/reactlibrary/ReactContextBuilder.java:11: error: package com.facebook.react.jscexecutor does not exist
15:10:24.181 [ERROR] [system.err] import com.facebook.react.jscexecutor.JSCExecutorFactory;
15:10:24.181 [ERROR] [system.err]                                      ^
15:10:24.268 [ERROR] [system.err] /Users/archidraw/Documents/workspace/Jerry/APP-archisketch/node_modules/react-native-threads/android/src/main/java/com/reactlibrary/ReactContextBuilder.java:61: error: cannot find symbol
15:10:24.268 [ERROR] [system.err]         JavaScriptExecutor jsExecutor = new JSCExecutorFactory(appName, deviceName)
15:10:24.268 [ERROR] [system.err]                                             ^
15:10:24.268 [ERROR] [system.err]   symbol:   class JSCExecutorFactory
15:10:24.268 [ERROR] [system.err]   location: class ReactContextBuilder
15:10:24.284 [ERROR] [system.err] 2 errors
15:10:24.285 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Execute compile for :react-native-threads:compileDebugJavaWithJavac'
15:10:24.288 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute compile for :react-native-threads:compileDebugJavaWithJavac' completed
15:10:24.288 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Fingerprinting property destinationDir (Output) for task ':react-native-threads:compileDebugJavaWithJavac'
15:10:24.289 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Fingerprinting property options.annotationProcessorGeneratedSourcesDirectory (Output) for task ':react-native-threads:compileDebugJavaWithJavac'
15:10:24.289 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Removed task artifact state for {} from context.
15:10:24.289 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':react-native-threads:compileDebugJavaWithJavac'
15:10:24.289 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Task :react-native-threads:compileDebugJavaWithJavac'
15:10:24.290 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 42: dispatching class org.gradle.launcher.daemon.protocol.BuildEvent
15:10:24.291 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Task :react-native-threads:compileDebugJavaWithJavac' completed
15:10:24.291 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :react-native-threads:compileDebugJavaWithJavac (Thread[Task worker for ':' Thread 5,5,main]) completed. Took 0.514 secs.
15:10:24.291 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':' Thread 5: released lock on :
15:10:24.292 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1.83 completed (1 worker(s) in use)
15:10:24.292 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':' Thread 5: released lock on root.1.83
15:10:24.292 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 5,5,main]] finished, busy: 0.716 secs, idle: 7.006 secs
15:10:24.292 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 4,5,main]] finished, busy: 0.154 secs, idle: 7.568 secs
15:10:24.292 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Daemon worker,5,main]] finished, busy: 1.49 secs, idle: 6.232 secs
15:10:24.292 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 6,5,main]] finished, busy: 0.129 secs, idle: 7.593 secs
15:10:24.292 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 3,5,main]] finished, busy: 3.939 secs, idle: 3.784 secs
15:10:24.292 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':',5,main]] finished, busy: 0.547 secs, idle: 7.176 secs
15:10:24.292 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 2,5,main]] finished, busy: 0.815 secs, idle: 6.908 secs
15:10:24.292 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 7,5,main]] finished, busy: 0.054 secs, idle: 7.667 secs
15:10:24.294 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskExecutionGraph] Timing: Executing the DAG took 7.733 secs
15:10:24.295 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Run tasks'
15:10:24.296 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 17: dispatching class org.gradle.launcher.daemon.protocol.BuildEvent
15:10:24.296 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Run tasks' completed
15:10:24.307 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
15:10:24.307 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
15:10:24.307 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
15:10:24.307 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
15:10:24.308 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':react-native-threads:compileDebugJavaWithJavac'.
15:10:24.308 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Compilation failed; see the compiler error output for details.
15:10:24.308 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
15:10:24.308 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
15:10:24.308 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.  Run with --scan to get full insights.
15:10:24.308 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
15:10:24.308 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
15:10:24.308 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] 
15:10:24.309 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 18s

Gist

com.facebook.react.jscexecutor does not exit

I think this is the last error I should solve before successfully upgrading to react-native 0.57. Has anybody had this error? Please help me.

Thank you.

SokWonJeremyKim commented 5 years ago

Oh, I figured out that com.facebook.react.jscexecutor.JSCExecutorFactory is a newly added class in react-native 58.

By downgrading to 0.0.15, I could build the application.

shabeer3508 commented 5 years ago

Oh, I figured out that com.facebook.react.jscexecutor.JSCExecutorFactory is a newly added class in react-native 58.

By downgrading to 0.0.15, I could build the application.

I am having the same issue, can you explain to me downgrading what will solve the issue. am not familiar with JSCExecutorFactory

ChenhuaWANG22 commented 5 years ago

@shabeer3508 a little bit late, mainly for future community members: here 0.0.15 means the version of react-native-threads.

According to my test, react-native 0.57.1 is compatible with react-native-threads 0.0.15, not the latest 0.0.16 (which will lead to the error mentioned above).

Oh, I figured out that com.facebook.react.jscexecutor.JSCExecutorFactory is a newly added class in react-native 58.

By downgrading to 0.0.15, I could build the application.