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

Execution failed for task ':app:compileDebugJavaWithJavac'. error plz help #180

Closed
kingk5 opened this issue Jul 19, 2020 · 3 comments
Closed

Comments

@kingk5
Copy link

kingk5 commented Jul 19, 2020

C:\Users\Home\Desktop\all same\flutter-unity-view-widget-master\flutter-unity-view-widget-master\example\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java:17: error: package com.rexraphael.flutterunitywidget does not exist
com.rexraphael.flutterunitywidget.FlutterUnityWidgetPlugin.registerWith(shimPluginRegistry.registrarFor("com.rexraphael.flutterunitywidget.FlutterUnityWidgetPlugin"));
^
1 error

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

BUILD FAILED in 3s
Finished with error: Gradle task assembleDebug failed with exit code 1

flutter run -v log:-

C:\Users\Home\Desktop\all same\flutter-unity-view-widget-master\flutter-unity-view-widget-master\example>flutter run -v
[ +29 ms] executing: [C:\Program Files\flutter] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +91 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] 0b8abb4724aa590dd0f429683339b1e045a1594d
[ ] executing: [C:\Program Files\flutter] git describe --match v*.. --first-parent --long --tags
[ +76 ms] Exit code 0 from: git describe --match v*.. --first-parent --long --tags
[ ] v1.12.13+hotfix.8-0-g0b8abb472
[ +7 ms] executing: [C:\Program Files\flutter] git rev-parse --abbrev-ref --symbolic @{u}
[ +62 ms] Exit code 128 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] fatal: HEAD does not point to a branch
[ +15 ms] executing: [C:\Program Files\flutter] git rev-parse --abbrev-ref HEAD
[ +59 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] HEAD
[ +85 ms] executing: C:\Users\Home\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
[ +35 ms] Exit code 0 from: C:\Users\Home\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
[ ] List of devices attached
32111c8f0604 device product:tissot model:Mi_A1 device:tissot_sprout transport_id:18
[ +18 ms] C:\Users\Home\AppData\Local\Android\Sdk\platform-tools\adb.exe -s 32111c8f0604 shell getprop
[ +119 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[ +8 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +4 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +53 ms] Found plugin flutter_unity_widget at C:\Program Files\flutter.pub-cache\hosted\pub.dartlang.org\flutter_unity_widget-0.1.6+8
[ +174 ms] Found plugin flutter_unity_widget at C:\Program Files\flutter.pub-cache\hosted\pub.dartlang.org\flutter_unity_widget-0.1.6+8
[ +83 ms] Generating C:\Users\Home\Desktop\all
same\flutter-unity-view-widget-master\flutter-unity-view-widget-master\example\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[ +68 ms] ro.hardware = qcom
[ +46 ms] Launching lib\main.dart on Mi A1 in debug mode...
[ +17 ms] executing: C:\Users\Home\AppData\Local\Android\Sdk\platform-tools\adb.exe -s 32111c8f0604 shell -x logcat -v time -t 1
[ +80 ms] Exit code 0 from: C:\Users\Home\AppData\Local\Android\Sdk\platform-tools\adb.exe -s 32111c8f0604 shell -x logcat -v time -t 1
[ ] --------- beginning of main
07-20 16:16:49.072 W/Settings( 6940): Setting preferred_network_mode has moved from android.provider.Settings.Secure to android.provider.Settings.Global.
[ +6 ms] executing: C:\Users\Home\AppData\Local\Android\Sdk\platform-tools\adb.exe version
[ +2 ms] executing: C:\Users\Home\AppData\Local\Android\Sdk\platform-tools\adb.exe -s 32111c8f0604 logcat -v time -T 07-20 16:16:49.072
[ +46 ms] Android Debug Bridge version 1.0.41
Version 29.0.5-5949299
Installed as C:\Users\Home\AppData\Local\Android\Sdk\platform-tools\adb.exe
[ +5 ms] executing: C:\Users\Home\AppData\Local\Android\Sdk\platform-tools\adb.exe start-server
[ +39 ms] Building APK
[ +22 ms] Running Gradle task 'assembleDebug'...
[ +3 ms] gradle.properties already sets android.enableR8
[ +6 ms] Using gradle from C:\Users\Home\Desktop\all same\flutter-unity-view-widget-master\flutter-unity-view-widget-master\example\android\gradlew.bat.
[ +15 ms] executing: C:\Program Files\Android\Android Studio1\jre\bin\java -version
[ +166 ms] Exit code 0 from: C:\Program Files\Android\Android Studio1\jre\bin\java -version
[ +1 ms] openjdk version "1.8.0_242-release"
OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
OpenJDK 64-Bit Server VM (build 25.242-b01, mixed mode)
[ +3 ms] executing: C:\Program Files\Android\Android Studio1\jre\bin\java -version
[ +161 ms] Exit code 0 from: C:\Program Files\Android\Android Studio1\jre\bin\java -version
[ +1 ms] openjdk version "1.8.0_242-release"
OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
OpenJDK 64-Bit Server VM (build 25.242-b01, mixed mode)
[ +5 ms] executing: [C:\Users\Home\Desktop\all same\flutter-unity-view-widget-master\flutter-unity-view-widget-master\example\android] C:\Users\Home\Desktop\all
same\flutter-unity-view-widget-master\flutter-unity-view-widget-master\example\android\gradlew.bat -Pverbose=true -Ptarget=C:\Users\Home\Desktop\all
same\flutter-unity-view-widget-master\flutter-unity-view-widget-master\example\lib\main.dart -Ptrack-widget-creation=true -Pfilesystem-scheme=org-dartlang-root
-Ptarget-platform=android-arm64 assembleDebug
[+2822 ms] > Task :app:compileFlutterBuildDebug UP-TO-DATE
[ +1 ms] > Task :app:packLibsflutterBuildDebug UP-TO-DATE
[ ] > Task :app:preBuild UP-TO-DATE
[ ] > Task :app:preDebugBuild UP-TO-DATE
[ ] > Task :UnityExport:preBuild UP-TO-DATE
[ +1 ms] > Task :UnityExport:preDebugBuild UP-TO-DATE
[ ] > Task :UnityExport:compileDebugAidl NO-SOURCE
[ ] > Task :app:compileDebugAidl NO-SOURCE
[ +72 ms] > Task :UnityExport:packageDebugRenderscript NO-SOURCE
[ +3 ms] > Task :app:compileDebugRenderscript NO-SOURCE
[ +8 ms] > Task :app:checkDebugManifest UP-TO-DATE
[ ] > Task :app:generateDebugBuildConfig UP-TO-DATE
[ +87 ms] > Task :app:cleanMergeDebugAssets
[ +2 ms] > Task :app:mergeDebugShaders UP-TO-DATE
[ +6 ms] > Task :app:compileDebugShaders UP-TO-DATE
[ ] > Task :app:generateDebugAssets UP-TO-DATE
[ +1 ms] > Task :UnityExport:mergeDebugShaders UP-TO-DATE
[ +6 ms] > Task :UnityExport:compileDebugShaders UP-TO-DATE
[ ] > Task :UnityExport:generateDebugAssets UP-TO-DATE
[ ] > Task :UnityExport:packageDebugAssets UP-TO-DATE
[ +154 ms] > Task :app:mergeDebugAssets
[ +430 ms] > Task :app:copyFlutterAssetsDebug
[ +3 ms] > Task :app:mainApkListPersistenceDebug UP-TO-DATE
[ +1 ms] > Task :app:generateDebugResValues UP-TO-DATE
[ ] > Task :app:generateDebugResources UP-TO-DATE
[ ] > Task :UnityExport:compileDebugRenderscript NO-SOURCE
[ ] > Task :UnityExport:generateDebugResValues UP-TO-DATE
[ ] > Task :UnityExport:generateDebugResources UP-TO-DATE
[ ] > Task :UnityExport:packageDebugResources UP-TO-DATE
[ ] > Task :app:mergeDebugResources UP-TO-DATE
[ ] > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
[ ] > Task :UnityExport:checkDebugManifest UP-TO-DATE
[ ] > Task :UnityExport:processDebugManifest UP-TO-DATE
[ ] > Task :app:processDebugManifest UP-TO-DATE
[ +217 ms] > Task :UnityExport:parseDebugLibraryResources UP-TO-DATE
[ +124 ms] > Task :UnityExport:generateDebugRFile UP-TO-DATE
[ +1 ms] > Task :app:processDebugResources UP-TO-DATE
[ +1 ms] > Task :UnityExport:generateDebugBuildConfig UP-TO-DATE
[ ] > Task :UnityExport:javaPreCompileDebug UP-TO-DATE
[ ] > Task :UnityExport:compileDebugJavaWithJavac UP-TO-DATE
[ +1 ms] > Task :UnityExport:bundleLibCompileDebug UP-TO-DATE
[ +1 ms] > Task :app:compileDebugKotlin UP-TO-DATE
[ ] > Task :app:javaPreCompileDebug UP-TO-DATE
[ +135 ms] > Task :app:compileDebugJavaWithJavac FAILED
[ +4 ms] C:\Users\Home\Desktop\all
same\flutter-unity-view-widget-master\flutter-unity-view-widget-master\example\android\app\src\main\java\i
o\flutter\plugins\GeneratedPluginRegistrant.java:17: error: package
com.rexraphael.flutterunitywidget does not exist
[ +3 ms] com.rexraphael.flutterunitywidget.FlutterUnityWidgetPlugin.registerWith(shimPluginRegistry.registrarFor("com.rexraphael.flutterunitywidget.FlutterUnityWidgetPlugin"));
[ +1 ms] ^
[ ] 1 error
[ ] FAILURE: Build failed with an exception.
[ +1 ms] * 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.
[ +2 ms] * Get more help at https://help.gradle.org
[ +1 ms] BUILD FAILED in 3s
[ +1 ms] 31 actionable tasks: 4 executed, 27 up-to-date
[ +780 ms] Running Gradle task 'assembleDebug'... (completed in 5.3s)
[ +8 ms] "flutter run" took 6,270ms.
Gradle task assembleDebug failed with exit code 1

#0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1 buildGradleApp (package:flutter_tools/src/android/gradle.dart:387:7)

#2 _AndroidBuilderImpl.buildApk (package:flutter_tools/src/android/android_builder.dart:97:13)
#3 AndroidDevice.startApp (package:flutter_tools/src/android/android_device.dart:522:28)

#4 FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:450:54)
#5 _asyncThenWrapperHelper. (dart:async-patch/async_patch.dart:73:64)
#6 _rootRunUnary (dart:async/zone.dart:1134:38)
#7 _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#8 _FutureListener.handleValue (dart:async/future_impl.dart:139:18)
#9 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:680:45)
#10 Future._propagateToListeners (dart:async/future_impl.dart:709:32)
#11 Future._completeWithValue (dart:async/future_impl.dart:524:5)
#12 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:32:15)
#13 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:290:13)
#14 ApplicationPackageFactory.getPackageForPlatform (package:flutter_tools/src/application_package.dart)
#15 _asyncThenWrapperHelper. (dart:async-patch/async_patch.dart:73:64)
#16 _rootRunUnary (dart:async/zone.dart:1134:38)
#17 _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#18 _FutureListener.handleValue (dart:async/future_impl.dart:139:18)
#19 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:680:45)
#20 Future._propagateToListeners (dart:async/future_impl.dart:709:32)
#21 Future._completeWithValue (dart:async/future_impl.dart:524:5)
#22 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:32:15)
#23 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:290:13)
#24 AndroidApk.fromAndroidProject (package:flutter_tools/src/application_package.dart)
#25 _asyncThenWrapperHelper. (dart:async-patch/async_patch.dart:73:64)
#26 _rootRunUnary (dart:async/zone.dart:1134:38)
#27 _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#28 _FutureListener.handleValue (dart:async/future_impl.dart:139:18)
#29 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:680:45)
#30 Future._propagateToListeners (dart:async/future_impl.dart:709:32)
#31 Future._completeWithValue (dart:async/future_impl.dart:524:5)
#32 Future._asyncComplete. (dart:async/future_impl.dart:554:7)
#33 _rootRun (dart:async/zone.dart:1126:13)
#34 _CustomZone.run (dart:async/zone.dart:1023:19)
#35 _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#36 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:965:23)
#37 _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#38 _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:
Gradle | Search for Help with Gradle
[Photo]
5)
#39 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#40 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:175:5)

flutter doctor log:-
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel unknown, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18363.900], locale en-IN)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Android Studio (version 4.0)
[!] VS Code (version 1.44.2)
X Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[√] Connected device (1 available)

  • 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 26s
Exception: Gradle task assembleDebug failed with exit code 1

@kingk5 kingk5 changed the title error plz help Execution failed for task ':app:compileDebugJavaWithJavac'. error plz help Jul 20, 2020
@AmoryR
Copy link

AmoryR commented Jul 30, 2020

I have the same issue, I can't figure it out. I followed the tutorial step by step multiple times with the example folder and get this error each time...

@AmoryR
Copy link

AmoryR commented Jul 30, 2020

I just fix this error buy moving the unity-classes.jar (UnityExport/lib) to folder unity-classes.
I found this solution here : #162
Also : https://www.youtube.com/watch?v=exNPmv_7--Q at 3:55
Now I can run the app but it crash when I want to open WithARkitScreen() using the router like the exemple ...

@juicycleff
Copy link
Owner

please use the new build script :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants