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

Error when Import Sceneform Asset: Gradle build failed with new import rules. Would you like to revert the changes? #1004

Open StefanHeng opened 4 years ago

StefanHeng commented 4 years ago

When I 'Import Sceneform Asse't. I got Gradle build failed with new import rules. Would you like to revert the changes?. But there seems to be no changes, because there's no 'Sync Now' prompt.

I tested with the google codelab ARCore Augmented Images tutorial: https://codelabs.developers.google.com/codelabs/augimg-intro/index.html?index=..%2F..index#3. I used the GreenMaze.obj as the tutorial says.

As I recall, I successfully imported the model last summer with Sceneform 1.9.0. To reproduce the error, I tested with Android Studio version 3.6.1, Sceneform version 1.15.0 and Google Sceneform Tools (BETA) plugin version 1.15.0, both on macOS Catalina 10.15.3 and windows 10.

This is the exception I received.

java.lang.RuntimeException: java.lang.NoSuchMethodError: com.android.tools.idea.projectsystem.ProjectSystemSyncManager.syncProject(Lcom/android/tools/idea/projectsystem/ProjectSystemSyncManager$SyncReason;Z)Lcom/google/common/util/concurrent/ListenableFuture;
    at com.intellij.openapi.application.impl.LaterInvocator.invokeAndWait(LaterInvocator.java:175)
    at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:638)
    at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:643)
    at com.google.ar.sceneform.plugin.actions.ui.GenerateSfbModel.promptAndRestoreGradleFile(GenerateSfbModel.java:231)
    at com.google.ar.sceneform.plugin.actions.ui.GenerateSfbModel.applyAndExecuteGradleRule(GenerateSfbModel.java:434)
    at com.google.ar.sceneform.plugin.actions.ui.GenerateSfbModel.access$000(GenerateSfbModel.java:52)
    at com.google.ar.sceneform.plugin.actions.ui.GenerateSfbModel$3.run(GenerateSfbModel.java:462)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodError: com.android.tools.idea.projectsystem.ProjectSystemSyncManager.syncProject(Lcom/android/tools/idea/projectsystem/ProjectSystemSyncManager$SyncReason;Z)Lcom/google/common/util/concurrent/ListenableFuture;
    at com.google.ar.sceneform.plugin.actions.ui.GenerateSfbModel.lambda$promptAndRestoreGradleFile$0(GenerateSfbModel.java:245)
    at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:312)
    at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:152)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:433)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:416)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:399)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
    at java.awt.EventQueue.access$500(EventQueue.java:98)
    at java.awt.EventQueue$3.run(EventQueue.java:715)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:878)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:827)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:466)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:704)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:465)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Screen Shot 2020-03-06 at 14 38 42 Screen Shot 2020-03-06 at 14 39 18
tellypresence commented 4 years ago

Possible dupe of https://github.com/google-ar/sceneform-android-sdk/issues/989