google-ar / sceneform-android-sdk

Sceneform SDK for Android
https://developers.google.com/sceneform/develop/
Apache License 2.0
1.23k stars 604 forks source link

Sample project hellosceneform failed to build #13

Closed rongguodong closed 6 years ago

rongguodong commented 6 years ago

Open hellosceneform in Android Studio, I got the error of "Error converting asset". Details are as follows. How can I use this sample?

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileAsset-src_47main_47res_47raw_47andy'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70) at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62) at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87) at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.RuntimeException: Error converting asset. at com.google.ar.sceneform.plugin.CompileAssetsTask.action(CompileAssetsTask.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:780) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:747) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92) ... 32 more

rongguodong commented 6 years ago

I am using Android Studio 3.1.2 on Ubuntu 16.04. Detailed information about my Android Studio are as follows:

Android Studio 3.1.2 Build #AI-173.4720617, built on April 13, 2018 JRE: 1.8.0_152-release-1024-b01 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 4.4.0-124-generic

rongguodong commented 6 years ago

I followed the suggestion from issue #1 given by @tpsiaki, and got the following output:

gradle compileSceneformAssets --info To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.10/userguide/gradle_daemon.html. Starting daemon process: workingDir = /home/grong/.gradle/daemon/2.10, daemonArgs: [/usr/lib/jvm/java-8-openjdk-amd64/bin/java, -Xmx1536m, -Dfile.encoding=UTF-8, -Duser.country=US, -Duser.language=en, -Duser.variant, -cp, /usr/share/gradle/lib/gradle-launcher-2.10.jar, org.gradle.launcher.daemon.bootstrap.GradleDaemon, 2.10] Starting process 'Gradle build daemon'. Working directory: /home/grong/.gradle/daemon/2.10 Command: /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Xmx1536m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /usr/share/gradle/lib/gradle-launcher-2.10.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 2.10 Successfully started process 'Gradle build daemon' An attempt to start the daemon took 0.996 secs. Connected to daemon DaemonInfo{pid=7025, address=[ccf4800a-5a02-4376-afd8-1b7d666b9df6 port:36222, addresses:[/0:0:0:0:0:0:0:1%lo, /127.0.0.1]], idle=false, context=DefaultDaemonContext[uid=2f27a8ac-cd58-47c2-a12f-b4d14d77ae32,javaHome=/usr/lib/jvm/java-8-openjdk-amd64,daemonRegistryDir=/home/grong/.gradle/daemon,pid=7025,idleTimeout=120000,daemonOpts=-Xmx1536m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]}. Dispatching request BuildAndStop{id=8c01f2aa-85b8-4d0d-8b29-633ec120b2f2.1, currentDir=/home/grong/Android/ARCore/sceneform-android-sdk-1.0.0/hellosceneform}. Received result org.gradle.launcher.daemon.protocol.BuildStarted@5a37d3ed from daemon DaemonInfo{pid=7025, address=[ccf4800a-5a02-4376-afd8-1b7d666b9df6 port:36222, addresses:[/0:0:0:0:0:0:0:1%lo, /127.0.0.1]], idle=false, context=DefaultDaemonContext[uid=2f27a8ac-cd58-47c2-a12f-b4d14d77ae32,javaHome=/usr/lib/jvm/java-8-openjdk-amd64,daemonRegistryDir=/home/grong/.gradle/daemon,pid=7025,idleTimeout=120000,daemonOpts=-Xmx1536m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be starting). The client will now receive all logging from the daemon (pid: 7025). The daemon log file: /home/grong/.gradle/daemon/2.10/daemon-7025.out.log Executing build with daemon context: DefaultDaemonContext[uid=2f27a8ac-cd58-47c2-a12f-b4d14d77ae32,javaHome=/usr/lib/jvm/java-8-openjdk-amd64,daemonRegistryDir=/home/grong/.gradle/daemon,pid=7025,idleTimeout=120000,daemonOpts=-Xmx1536m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant] Starting Build Compiling settings file '/home/grong/Android/ARCore/sceneform-android-sdk-1.0.0/hellosceneform/settings.gradle' using SubsetScriptTransformer. Compiling settings file '/home/grong/Android/ARCore/sceneform-android-sdk-1.0.0/hellosceneform/settings.gradle' using BuildScriptTransformer. Settings evaluated using settings file '/home/grong/Android/ARCore/sceneform-android-sdk-1.0.0/hellosceneform/settings.gradle'. Projects loaded. Root project using build file '/home/grong/Android/ARCore/sceneform-android-sdk-1.0.0/hellosceneform/build.gradle'. Included projects: [root project 'hellosceneform', project ':app'] Evaluating root project 'hellosceneform' using build file '/home/grong/Android/ARCore/sceneform-android-sdk-1.0.0/hellosceneform/build.gradle'. Compiling build file '/home/grong/Android/ARCore/sceneform-android-sdk-1.0.0/hellosceneform/build.gradle' using SubsetScriptTransformer.

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 4.845 secs Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Build file '/home/grong/Android/ARCore/sceneform-android-sdk-1.0.0/hellosceneform/build.gradle' line: 20 A problem occurred evaluating root project 'hellosceneform'.] from daemon DaemonInfo{pid=7025, address=[ccf4800a-5a02-4376-afd8-1b7d666b9df6 port:36222, addresses:[/0:0:0:0:0:0:0:1%lo, /127.0.0.1]], idle=false, context=DefaultDaemonContext[uid=2f27a8ac-cd58-47c2-a12f-b4d14d77ae32,javaHome=/usr/lib/jvm/java-8-openjdk-amd64,daemonRegistryDir=/home/grong/.gradle/daemon,pid=7025,idleTimeout=120000,daemonOpts=-Xmx1536m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).

tpsiaki commented 6 years ago

@rongguodong - it looks like your build is having trouble connecting to the google() maven repository. Can you check whether you have access to our plugin from the machine you are using to build? The link that you'll need to be able to access from your build machine is: https://dl.google.com/dl/android/maven2/com/google/ar/sceneform/plugin/1.0.0/plugin-1.0.0.jar

rongguodong commented 6 years ago

The above error is because of gradle version. I have manually upgraded it to 4.7., and got the following errors:

Task :app:compileAsset-src_47main_47res_47raw_47andy FAILED Error running process. Task ':app:compileAsset-src_47main_47res_47raw_47andy' is not up-to-date because: Task.upToDateWhen is false. Error running process. :app:compileAsset-src_47main_47res_47raw_47andy (Thread[Task worker for ':',5,main]) completed. Took 0.006 secs.

FAILURE: Build failed with an exception.

BUILD FAILED in 0s 3 actionable tasks: 1 executed, 2 up-to-date

rongguodong commented 6 years ago

@tpsiaki Yes. I do have access to that link. I can manually download it.

tpsiaki commented 6 years ago

@rongguodong - Now that you have the gradle plugin, it looks like one of the tools we run to compile assets is failing. Since it's not getting to the actual error messages in this tool it seems that it may be having trouble loading shared-libraries, which would indicate that we have compatibility issues with your linux distro. To double-check whether this is the case, will you try these steps:

  1. pushd sceneform-android-sdk/hellosceneform/app
  2. ldd build/sceneform_sdk/linux/converter
  3. attach the output to this issue, or just let us know if any of the lines say something like "*.so => not found"
rongguodong commented 6 years ago

@tpsiaki Here is the output:

ldd build/sceneform_sdk/linux/converter linux-vdso.so.1 => (0x00007ffeb5b8a000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe05aef0000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe05acd3000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fe05aacb000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe05a7c2000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe05a3f8000) /usr/grte/v4/lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007fe05ca5c000)

It seems not .so file is not found.

tpsiaki commented 6 years ago

@rongguodong - if you run:

gradle :app:compileAsset-src_47main_47res_47raw_47andy --info

do you see any errors or warnings before the exception that you saw above?

rongguodong commented 6 years ago

@tpsiaki I attached whole outpout for "gradle :app:compileAsset-src_47main_47res_47raw_47andy --info" here:

$ gradle :app:compileAsset-src_47main_47res_47raw_47andy --info Initialized native services in: /home/grong/.gradle/native Removing 0 daemon stop events from registry Starting a Gradle Daemon (subsequent builds will be faster) Starting process 'Gradle build daemon'. Working directory: /home/grong/.gradle/daemon/4.7 Command: /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Xmx1536m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /usr/lib/gradle/4.7/lib/gradle-launcher-4.7.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 4.7 Successfully started process 'Gradle build daemon' An attempt to start the daemon took 0.945 secs. The client will now receive all logging from the daemon (pid: 20967). The daemon log file: /home/grong/.gradle/daemon/4.7/daemon-20967.out.log Starting build in new daemon [memory: 1.4 GB] Using 8 worker leases. Starting Build Settings evaluated using settings file '/home/grong/Android/ARCore/sceneform-android-sdk-1.0.0/hellosceneform/settings.gradle'. Projects loaded. Root project using build file '/home/grong/Android/ARCore/sceneform-android-sdk-1.0.0/hellosceneform/build.gradle'. Included projects: [root project 'hellosceneform', project ':app']

Configure project : Evaluating root project 'hellosceneform' using build file '/home/grong/Android/ARCore/sceneform-android-sdk-1.0.0/hellosceneform/build.gradle'.

Configure project :app Evaluating project ':app' using build file '/home/grong/Android/ARCore/sceneform-android-sdk-1.0.0/hellosceneform/app/build.gradle'. Creating configuration androidTestUtil Creating configuration compile Creating configuration apk Creating configuration provided Creating configuration api Creating configuration implementation Creating configuration runtimeOnly Creating configuration compileOnly Creating configuration wearApp Creating configuration annotationProcessor Creating configuration androidTestCompile Creating configuration androidTestApk Creating configuration androidTestProvided Creating configuration androidTestApi Creating configuration androidTestImplementation Creating configuration androidTestRuntimeOnly Creating configuration androidTestCompileOnly Creating configuration androidTestWearApp Creating configuration androidTestAnnotationProcessor Creating configuration testCompile Creating configuration testApk Creating configuration testProvided Creating configuration testApi Creating configuration testImplementation Creating configuration testRuntimeOnly Creating configuration testCompileOnly Creating configuration testWearApp Creating configuration testAnnotationProcessor Creating configuration debugCompile Creating configuration debugApk Creating configuration debugProvided Creating configuration debugApi Creating configuration debugImplementation Creating configuration debugRuntimeOnly Creating configuration debugCompileOnly Creating configuration debugWearApp Creating configuration debugAnnotationProcessor Creating configuration androidTestDebugCompile Creating configuration androidTestDebugApk Creating configuration androidTestDebugProvided Creating configuration androidTestDebugApi Creating configuration androidTestDebugImplementation Creating configuration androidTestDebugRuntimeOnly Creating configuration androidTestDebugCompileOnly Creating configuration androidTestDebugWearApp Creating configuration androidTestDebugAnnotationProcessor Creating configuration testDebugCompile Creating configuration testDebugApk Creating configuration testDebugProvided Creating configuration testDebugApi Creating configuration testDebugImplementation Creating configuration testDebugRuntimeOnly Creating configuration testDebugCompileOnly Creating configuration testDebugWearApp Creating configuration testDebugAnnotationProcessor Creating configuration releaseCompile Creating configuration releaseApk Creating configuration releaseProvided Creating configuration releaseApi Creating configuration releaseImplementation Creating configuration releaseRuntimeOnly Creating configuration releaseCompileOnly Creating configuration releaseWearApp Creating configuration releaseAnnotationProcessor Creating configuration testReleaseCompile Creating configuration testReleaseApk Creating configuration testReleaseProvided Creating configuration testReleaseApi Creating configuration testReleaseImplementation Creating configuration testReleaseRuntimeOnly Creating configuration testReleaseCompileOnly Creating configuration testReleaseWearApp Creating configuration testReleaseAnnotationProcessor Parsing the SDK, no caching allowed Parsing /home/grong/Android/Sdk/build-tools/20.0.0/package.xml Parsing /home/grong/Android/Sdk/build-tools/23.0.3/package.xml Parsing /home/grong/Android/Sdk/build-tools/25.0.0/package.xml Parsing /home/grong/Android/Sdk/build-tools/25.0.1/package.xml Parsing /home/grong/Android/Sdk/build-tools/25.0.2/package.xml Parsing /home/grong/Android/Sdk/build-tools/25.0.3/package.xml Parsing /home/grong/Android/Sdk/build-tools/26.0.2/package.xml Parsing /home/grong/Android/Sdk/build-tools/27.0.3/package.xml Parsing /home/grong/Android/Sdk/cmake/3.6.3155560/package.xml Parsing /home/grong/Android/Sdk/emulator/package.xml Parsing /home/grong/Android/Sdk/extras/android/gapid/3/package.xml Parsing /home/grong/Android/Sdk/extras/android/m2repository/package.xml Parsing /home/grong/Android/Sdk/extras/google/m2repository/package.xml Parsing /home/grong/Android/Sdk/extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.1/package.xml Parsing /home/grong/Android/Sdk/extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.2/package.xml Parsing /home/grong/Android/Sdk/extras/m2repository/com/android/support/constraint/constraint-layout/1.0.1/package.xml Parsing /home/grong/Android/Sdk/extras/m2repository/com/android/support/constraint/constraint-layout/1.0.2/package.xml Parsing /home/grong/Android/Sdk/lldb/2.3/package.xml Parsing /home/grong/Android/Sdk/ndk-bundle/package.xml Parsing /home/grong/Android/Sdk/patcher/v4/package.xml Parsing /home/grong/Android/Sdk/platform-tools/package.xml Parsing /home/grong/Android/Sdk/platforms/android-19/package.xml Parsing /home/grong/Android/Sdk/platforms/android-20/package.xml Parsing /home/grong/Android/Sdk/platforms/android-21/package.xml Parsing /home/grong/Android/Sdk/platforms/android-22/package.xml Parsing /home/grong/Android/Sdk/platforms/android-23/package.xml Parsing /home/grong/Android/Sdk/platforms/android-24/package.xml Parsing /home/grong/Android/Sdk/platforms/android-25/package.xml Parsing /home/grong/Android/Sdk/platforms/android-26/package.xml Parsing /home/grong/Android/Sdk/platforms/android-27/package.xml Parsing /home/grong/Android/Sdk/platforms/android-P/package.xml Parsing /home/grong/Android/Sdk/sources/android-19/package.xml Parsing /home/grong/Android/Sdk/sources/android-20/package.xml Parsing /home/grong/Android/Sdk/sources/android-21/package.xml Parsing /home/grong/Android/Sdk/sources/android-22/package.xml Parsing /home/grong/Android/Sdk/sources/android-23/package.xml Parsing /home/grong/Android/Sdk/sources/android-24/package.xml Parsing /home/grong/Android/Sdk/sources/android-25/package.xml Parsing /home/grong/Android/Sdk/sources/android-26/package.xml Parsing /home/grong/Android/Sdk/sources/android-27/package.xml Parsing /home/grong/Android/Sdk/system-images/android-25/google_apis/x86/package.xml Parsing /home/grong/Android/Sdk/tools/package.xml Parsing /home/grong/Android/Sdk/tools_new/package.xml Observed package id 'tools' in inconsistent location '/home/grong/Android/Sdk/tools_new' (Expected '/home/grong/Android/Sdk/tools') Already observed package id 'tools' in '/home/grong/Android/Sdk/tools'. Skipping duplicate at '/home/grong/Android/Sdk/tools_new' SDK initialized in 1248 ms Using incremental javac compilation for :app debug. Using incremental javac compilation for :app debugUnitTest. Using incremental javac compilation for :app release. Using incremental javac compilation for :app releaseUnitTest. Using incremental javac compilation for :app debugAndroidTest. All projects evaluated. Selected primary task ':app:compileAsset-src_47main_47res_47raw_47andy' from project :app Tasks to be executed: [task ':app:unzipSceneformSdk', task ':app:createAsset-src_47main_47res_47raw_47andy', task ':app:compileAsset-src_47main_47res_47raw_47andy'] :app:unzipSceneformSdk (Thread[Task worker for ':',5,main]) started.

Task :app:unzipSceneformSdk Task ':app:unzipSceneformSdk' is not up-to-date because: Task ':app:unzipSceneformSdk' class path has changed from 243dbf8d89a3bafcd2ab0b2704dfd719 to 9f193d8c53c569303a4f6addec39c990. :app:unzipSceneformSdk (Thread[Task worker for ':',5,main]) completed. Took 1.012 secs. :app:createAsset-src_47main_47res_47raw_47andy (Thread[Task worker for ':',5,main]) started.

Task :app:createAsset-src_47main_47res_47raw_47andy Task ':app:createAsset-src_47main_47res_47raw_47andy' is not up-to-date because: Task ':app:createAsset-src_47main_47res_47raw_47andy' class path has changed from 243dbf8d89a3bafcd2ab0b2704dfd719 to 9f193d8c53c569303a4f6addec39c990. :app:createAsset-src_47main_47res_47raw_47andy (Thread[Task worker for ':',5,main]) completed. Took 0.002 secs. :app:compileAsset-src_47main_47res_47raw_47andy (Thread[Task worker for ':',5,main]) started.

Task :app:compileAsset-src_47main_47res_47raw_47andy FAILED Error running process. Task ':app:compileAsset-src_47main_47res_47raw_47andy' is not up-to-date because: Task.upToDateWhen is false. Error running process. :app:compileAsset-src_47main_47res_47raw_47andy (Thread[Task worker for ':',5,main]) completed. Took 0.017 secs.

FAILURE: Build failed with an exception.

BUILD FAILED in 10s 3 actionable tasks: 3 executed

rongguodong commented 6 years ago

BTW: My reply above (the 3rd comment after I upgraded gradle) contains the error I got from the command line with "--stacktrace" option.

catchingAvocados commented 6 years ago

@rongguodong Any luck with the problem? I'm running into the same problem, too. I'm currently running on Ubuntu 18.04.

rongguodong commented 6 years ago

@catchingAvocados No luck. Still waiting for @tpsiaki for more feedbacks.

tpsiaki commented 6 years ago

@rongguodong @catchingAvocados - it looks like one of the issues here is with gradle version mismatches - will you try building using gradlew (the wrapper script provided inside the hellosceneform project) instead of gradle that you have installed locally on your machine? You may have to chmod +x gradlew to make the gradlew script executable - instructions:

  1. pushd /hellosceneform
  2. chmod +x gradlew
  3. ./gradlew compileSceneformAssets

The other thing to try is running our asset conversion component that seems to be failing directly from the terminal like so:

  1. pushd /hellosceneform/app
  2. build/sceneform_sdk/linux/converter sampledata/models/andy.sfa --desktop --output src/main/res/raw/andy
  3. Note whether that shows any errors. If there are, run this for more info (and attach output here):
  4. build/sceneform_sdk/linux/converter sampledata/models/andy.sfa --desktop --output src/main/res/raw/andy -v
dhruvesh13 commented 6 years ago

@tpsiaki I am getting this error on running the ./gradlew compileSceneformAssets

Exception in thread "main" java.lang.NoClassDefFoundError: org.gradle.wrapper.BootstrapMainStarter at java.lang.Class.initializeClass(libgcj.so.16) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) Caused by: java.lang.VerifyError: verification failed at PC 96 in org.gradle.wrapper.BootstrapMainStarter:start(([Ljava.lang.String;Ljava.io.File;)V): incompatible type on stack at java.lang.Class.initializeClass(libgcj.so.16) ...1 more

catchingAvocados commented 6 years ago

@tpsiaki The second thing you suggested does not work either. Running build/sceneform_sdk/linux/converter sampledata/models/andy.sfa --desktop --output src/main/res/raw/andy` produces "bash: build/sceneform_sdk/linux/converter: No such file or directory". However, I can confirm that converter is in the directory

joergreichert commented 6 years ago

under Linux Mint with 'sudo ./gradlew compileSceneformAssets --stacktrace' (and setting org.gradle.java.home=/usr/lib/jvm/java-8-oracle in gradle.properties to avoid using Java 9):

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileAsset-src_47main_47res_47raw_47andy'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70) at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62) at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87) at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) Caused by: java.lang.RuntimeException: Error converting asset. at com.google.ar.sceneform.plugin.CompileAssetsTask.action(CompileAssetsTask.java:60) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:780) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:747) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92) ... 29 more

bosskopp commented 6 years ago

@tpsiaki I'm getting the same results as described by @dhruvesh13 and @catchingAvocados

linux-vdso.so.1 (0x00007ffedfd3d000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ffa877f7000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ffa875d8000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ffa873d0000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ffa87032000)

(Seems to be OK)

./gradlew compileSceneformAssets Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details Task :app:compileAsset-src_47main_47res_47raw_47andy FAILED Error running process. Error running process. FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':app:compileAsset-src_47main_47res_47raw_47andy'. Error converting asset. 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 BUILD FAILED in 4s 3 actionable tasks: 1 executed, 2 up-to-date

ls -la build/sceneform_sdk/linux/ drwxr-xr-x 2 theuser theuser 4096 Mai 10 21:24 . drwxr-xr-x 6 theuser theuser 4096 Mai 10 21:24 .. -rwxr-xr-x 1 theuser theuser 26462960 Mai 14 08:47 converter -rwxr--r-- 1 theuser theuser 7831104 Mai 14 08:47 matc

but:

~/.../sceneform-android-sdk/hellosceneform/app/build/sceneform_sdk/linux$ ./converter sampledata/models/andy.sfa --desktop --output src/main/res/andy bash: ./converter: No such file or directory

I'm on Ubuntu 18.04, Linux 4.15.0-20-generic

trikko commented 6 years ago

Same problem here. In my case checking the executable it appears it is using a custom interpreter:

file converter 
converter: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter **/usr/grte/v4/lib64/ld-linux-x86-64.so.2**, for GNU/Linux 2.6.24, BuildID[md5/uuid]=8c1b77d154367804e5033d72b7be7a68, with debug_info, not stripped

I don't know where this come from. Indeed:

sudo mkdir -p /usr/grte/v4/lib64
sudo ln -s /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 /usr/grte/v4/lib64/ld-linux-x86-64.so.2

Now If i run ./converter it replies:

./converter: relocation error: ./converter: symbol __google_auxv version GLIBC_PRIVATE not defined in file ld-linux-x86-64.so.2 with link time reference

So problem is there.

tpsiaki commented 6 years ago

To follow up here - @trikko - thanks for the troubleshooting - I do believe that is the issue that most people are running into on this thread. We have a compatibility problem on Linux generally that is causing builds to fail.

We are working on the fix, and I will update here as soon as we have something sorted out that can unblock you all.

tpsiaki commented 6 years ago

We just pushed an update to the Sceneform Gradle plugin that fixes the compatibility issues on Linux. The new Gradle plugin version number is 1.0.1.

In order to use the version with the fix, please update your project:

In your project build.gradle file, replace this line: classpath 'com.google.ar.sceneform:plugin:1.0.0' with this line: classpath 'com.google.ar.sceneform:plugin:1.0.1'

The rest of the Sceneform dependencies should remain unchanged. If you make this change to the Sceneform sample projects, you will be able to build the project, and import using the Sceneform Tools plugin on Linux.

For reference, please see this commit which updates the samples to use the new plugin: https://github.com/google-ar/sceneform-android-sdk/commit/c238849f050d1dfbb72fbb61bd931bd047f9cb5b

killyox commented 6 years ago

I had the same problem "Cannot convert Asset", working on Windows. I think i found what was my problem, i had an unescaped character in my project directory's name (it was a "="). I Put the project source files into C:\ and it worked fine...

trikko commented 6 years ago

Works for me now @tpsiaki . Thank you.

tpsiaki commented 6 years ago

Linux build problems that were being tracked here should all be resolved with the 1.0.1 plugin release so I'm going to go ahead and close this issue.

rustyhamsterr commented 6 years ago

I'm not sure, whether i should hijack this or not :D I ran into the same problem: Error creating sfa.

Setup: Android Studio 3.1.4 Build #AI-173.4907809, built on July 23, 2018 JRE: 1.8.0_152-release-1024-b01 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 4.4.0-127-generic

Running this for further investigation: ./gradlew :app:compileAsset-src_47main_47res_47raw_47andy --info

I only got this (skipped okay part of log): :app:createAsset-src_47main_47res_47raw_47andy (Thread[Task worker for ':',5,main]) started.

Task :app:createAsset-src_47main_47res_47raw_47andy FAILED Putting task artifact state for task ':app:createAsset-src_47main_47res_47raw_47andy' into context took 0.0 secs. Up-to-date check for task ':app:createAsset-src_47main_47res_47raw_47andy' took 0.001 secs. It is not up-to-date because: Task.upToDateWhen is false. Command Line: /opt/testandroid/sceneform/hellosceneform/app/build/sceneform_sdk/linux/converter --no_sfb --mat build/sceneform_sdk/default_materials/obj_material.sfm -a --matc /opt/testandroid/sceneform/hellosceneform/app/build/sceneform_sdk/linux/matc --outdir /opt/testandroid/sceneform/hellosceneform/app/build/.sfa4303311088704507263 sampledata/models/andy.obj

:app:createAsset-src_47main_47res_47raw_47andy (Thread[Task worker for ':',5,main]) completed. Took 0.007 secs.

FAILURE: Build failed with an exception.

I changed folders, to exclude any problem with characters as reported above. So right now I'm of the opinion, the problem was not entirely solved :( I would appreciate input, on what to do now, to get sceneform running

Thanks rusty

gstanlo commented 6 years ago

Do the files referenced in the .sfa still resolve when running gradle from the directory you're using?

rustyhamsterr commented 6 years ago

@gstanlo Thanks for hint, decided to start again clean. I cloned repo again to a folder without special characters in path. The Error changes, but I have seen this before:

Task :app:compileAsset-src_47main_47res_47raw_47andy FAILED Command Line: /opt/testandroid/sceneform/hellosceneform/app/build/sceneform_sdk/linux/converter --check_up_to_date src/main/res/raw/andy.sfb Putting task artifact state for task ':app:compileAsset-src_47main_47res_47raw_47andy' into context took 0.008 secs. Up-to-date check for task ':app:compileAsset-src_47main_47res_47raw_47andy' took 0.0 secs. It is not up-to-date because: Task.upToDateWhen is false. Command Line: /opt/testandroid/sceneform/hellosceneform/app/build/sceneform_sdk/linux/converter sampledata/models/andy.sfa --desktop --output src/main/res/raw/andy :app:compileAsset-src_47main_47res_47raw_47andy (Thread[Task worker for ':',5,main]) completed. Took 0.013 secs. FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:compileAsset-src_47main_47res_47raw_47andy'. Error converting asset.

I also tried this gradle :app:compileAsset-src_47main_47res_47raw_47andy --info as mentioned above. It tells me it couldn't find google()

Included projects: [root project 'hellosceneform', project ':app'] Evaluating root project 'hellosceneform' using build file '/opt/testandroid/sceneform/hellosceneform/build.gradle'. Compiling build file '/opt/testandroid/sceneform/hellosceneform/build.gradle' using BuildScriptClasspathScriptTransformer. FAILURE: Build failed with an exception.

  • Where: Build file '/opt/testandroid/sceneform/hellosceneform/build.gradle' line: 20

A problem occurred evaluating root project 'hellosceneform'. Could not find method google() for arguments [] on repository container.

Any clue on this one? I am able to access the google-repo earlier given link.

gstanlo commented 6 years ago

That seems worrysome, did gradle download the converter tool? You might want to open a new issue for this.