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

unable to run or build flutter app #459

Closed
dev-husein opened this issue Aug 6, 2021 · 5 comments
Closed

unable to run or build flutter app #459

dev-husein opened this issue Aug 6, 2021 · 5 comments

Comments

@dev-husein
Copy link

Description:
Execution failed for task ':onesignal_flutter:generateDebugRFile'.

Could not resolve all files for configuration ':onesignal_flutter:debugCompileClasspath'.
> Could not resolve androidx.work:work-runtime:[2.0.0, 2.99.99].

(your description here)

Environment

Steps to Reproduce Issue:

  1. just trying to run or build apk it was working fine

Anything else:

[ +14 ms] Skipping pub get: version match.
[ +50 ms] Found plugin flutter_plugin_android_lifecycle at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_plugin_android_lifecycle-2.0.2
[ +19 ms] Found plugin google_maps_flutter at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\google_maps_flutter-2.0.6
[ +8 ms] Found plugin image_picker at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\image_picker-0.7.5+4
[ +1 ms] Found plugin image_picker_for_web at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\image_picker_for_web-2.0.0
[ +13 ms] Found plugin onesignal_flutter at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\onesignal_flutter-3.0.0
[ +4 ms] Found plugin path_provider at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\path_provider-2.0.2
[ +1 ms] Found plugin path_provider_linux at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\path_provider_linux-2.0.0
[ +2 ms] Found plugin path_provider_macos at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\path_provider_macos-2.0.0
[ +3 ms] Found plugin path_provider_windows at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\path_provider_windows-2.0.1
[ +8 ms] Found plugin shared_preferences at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\shared_preferences-2.0.6
[ +1 ms] Found plugin shared_preferences_linux at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\shared_preferences_linux-2.0.0
[ +2 ms] Found plugin shared_preferences_macos at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\shared_preferences_macos-2.0.0
[ +2 ms] Found plugin shared_preferences_web at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\shared_preferences_web-2.0.0
[ +2 ms] Found plugin shared_preferences_windows at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\shared_preferences_windows-2.0.0
[ +3 ms] Found plugin sqflite at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\sqflite-2.0.0+3
[ +101 ms] Found plugin flutter_plugin_android_lifecycle at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_plugin_android_lifecycle-2.0.2
[ +10 ms] Found plugin google_maps_flutter at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\google_maps_flutter-2.0.6
[ +4 ms] Found plugin image_picker at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\image_picker-0.7.5+4
[ +1 ms] Found plugin image_picker_for_web at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\image_picker_for_web-2.0.0
[ +5 ms] Found plugin onesignal_flutter at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\onesignal_flutter-3.0.0
[ +3 ms] Found plugin path_provider at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\path_provider-2.0.2
[ +1 ms] Found plugin path_provider_linux at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\path_provider_linux-2.0.0
[ +1 ms] Found plugin path_provider_macos at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\path_provider_macos-2.0.0
[ +2 ms] Found plugin path_provider_windows at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\path_provider_windows-2.0.1
[ +8 ms] Found plugin shared_preferences at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\shared_preferences-2.0.6
[ +1 ms] Found plugin shared_preferences_linux at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\shared_preferences_linux-2.0.0
[ +1 ms] Found plugin shared_preferences_macos at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\shared_preferences_macos-2.0.0
[ +1 ms] Found plugin shared_preferences_web at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\shared_preferences_web-2.0.0
[ +1 ms] Found plugin shared_preferences_windows at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\shared_preferences_windows-2.0.0
[ +2 ms] Found plugin sqflite at C:\Src\flutter.pub-cache\hosted\pub.dartlang.org\sqflite-2.0.0+3
[ +22 ms] Generating C:\Code\rehal_app\rehal_app\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[ +73 ms] Using hardware rendering with device sdk gphone x86. If you notice graphics artifacts, consider enabling software rendering with
"--enable-software-rendering".
[ +30 ms] Initializing file store
[ +11 ms] Skipping target: gen_localizations
[ +6 ms] complete
[ +4 ms] Launching lib\main.dart on sdk gphone x86 in debug mode...
[ +4 ms] C:\Src\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev
C:\Src\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root
C:\Src\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names
--experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dill
C:\Users\op\AppData\Local\Temp\flutter_tools.8f8eab15\flutter_tool.ab74cf01\app.dill --packages
C:\Code\rehal_app\rehal_app.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation
--filesystem-scheme org-dartlang-root --initialize-from-dill build\3c113a45063dc6628e68a4111abcacad.cache.dill.track.dill
--enable-experiment=alternative-invalidation-strategy
[ +16 ms] executing: C:\andoid_sdk\platform-tools\adb.exe -s emulator-5554 shell -x logcat -v time -t 1
[ +42 ms] <- compile package:rehal_app/main.dart
[ +71 ms] --------- beginning of system
08-06 17:57:19.393 W/AppOps ( 510): Noting op not finished: uid 10108 pkg com.google.android.gms code 79 startTime of in progress
event=1628258509792
[ +33 ms] executing: C:\andoid_sdk\platform-tools\adb.exe version
[ +70 ms] Android Debug Bridge version 1.0.41
Version 31.0.3-7562133
Installed as C:\andoid_sdk\platform-tools\adb.exe
[ +2 ms] executing: C:\andoid_sdk\platform-tools\adb.exe start-server
[ +50 ms] Building APK
[ +21 ms] Running Gradle task 'assembleDebug'...
[ +6 ms] Using gradle from C:\Code\rehal_app\rehal_app\android\gradlew.bat.
[ +14 ms] executing: [C:\Code\rehal_app\rehal_app\android/] C:\Code\rehal_app\rehal_app\android\gradlew.bat -Pverbose=true
-Ptarget-platform=android-x86 -Ptarget=C:\Code\rehal_app\rehal_app\lib\main.dart -Pdart-defines=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==
-Pdart-obfuscation=false -Ptrack-widget-creation=true -Ptree-shake-icons=false -Pfilesystem-scheme=org-dartlang-root assembleDebug
[ +903 ms] Welcome to Gradle 6.5!
[ +1 ms] Here are the highlights of this release:
[ +1 ms] - Experimental file-system watching
[ +1 ms] - Improved version ordering
[ +1 ms] - New samples
[ +1 ms] For more details see https://docs.gradle.org/6.5/release-notes.html
[+1594 ms] > Configure project :flutter_plugin_android_lifecycle
[ ] WARNING: The option setting 'android.enableR8=true' is deprecated.
[ ] It will be removed in version 5.0 of the Android Gradle plugin.
[ ] You will no longer be able to disable R8
[+23590 ms] > Task :app:compileFlutterBuildDebug
[ ] [ +77 ms] executing: [C:\Src\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] [ +142 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] [ ] f4abaa0735eba4dfd8f33f73363911d63931fe03
[ ] [ ] executing: [C:\Src\flutter/] git tag --points-at f4abaa0735eba4dfd8f33f73363911d63931fe03
[ ] [ +134 ms] Exit code 0 from: git tag --points-at f4abaa0735eba4dfd8f33f73363911d63931fe03
[ ] [ ] 2.2.3
[ ] [ +5 ms] executing: [C:\Src\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +1 ms] [ +106 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] [ ] origin/stable
[ ] [ ] executing: [C:\Src\flutter/] git ls-remote --get-url origin
[ ] [ +99 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] [ ] https://github.com/flutter/flutter.git
[ ] [ +55 ms] executing: [C:\Src\flutter/] git rev-parse --abbrev-ref HEAD
[ ] [ +107 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] [ ] stable
[ ] [ +88 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] [ ] 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.
[ ] [ +3 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.
[ +1 ms] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +78 ms] [ +106 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[ ] [ +4 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.
[ ] [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[ ] [ ] 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.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[ ] [ +44 ms] Initializing file store
[ ] [ +21 ms] Skipping target: gen_localizations
[ +85 ms] [ +7 ms] kernel_snapshot: Starting due to {}
[ ] [ +19 ms] C:\Src\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev
C:\Src\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root
C:\Src\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --target=flutter --no-print-incremental-dependencies
-DFLUTTER_WEB_AUTO_DETECT=true -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --no-link-platform --packages
C:\Code\rehal_app\rehal_app.dart_tool\package_config.json --output-dill
C:\Code\rehal_app\rehal_app.dart_tool\flutter_build\50b4bbda909e8ef5804823e9ba2cf5ee\app.dill --depfile
C:\Code\rehal_app\rehal_app.dart_tool\flutter_build\50b4bbda909e8ef5804823e9ba2cf5ee\kernel_snapshot.d package:rehal_app/main.dart
[+13605 ms] [+13604 ms] kernel_snapshot: Complete
[ +688 ms] [ +720 ms] debug_android_application: Starting due to {}
[ +303 ms] [ +282 ms] Manifest contained wildcard assets. Inserting missing file into build graph to force rerun. for more information see #56466.
[ +95 ms] [ +86 ms] debug_android_application: Complete
[ +802 ms] [ +787 ms] Persisting file store
[ ] [ +16 ms] Done persisting file store
[ ] [ +10 ms] build succeeded.
[ ] [ +19 ms] "flutter assemble" took 15,752ms.
[ +302 ms] [ +270 ms] ensureAnalyticsSent: 266ms
[ ] [ +1 ms] Running shutdown hooks
[ ] [ ] Shutdown hooks complete
[ ] [ ] exiting with code 0
[ +298 ms] > Task :app:packLibsflutterBuildDebug UP-TO-DATE
[ ] > Task :app:preBuild UP-TO-DATE
[ ] > Task :app:preDebugBuild UP-TO-DATE
[ ] > Task :flutter_plugin_android_lifecycle:preBuild UP-TO-DATE
[ ] > Task :flutter_plugin_android_lifecycle:preDebugBuild UP-TO-DATE
[ +92 ms] > Task :flutter_plugin_android_lifecycle:compileDebugAidl NO-SOURCE
[ ] > Task :google_maps_flutter:preBuild UP-TO-DATE
[ +1 ms] > Task :google_maps_flutter:preDebugBuild UP-TO-DATE
[ ] > Task :google_maps_flutter:compileDebugAidl NO-SOURCE
[ ] > Task :image_picker:preBuild UP-TO-DATE
[ ] > Task :image_picker:preDebugBuild UP-TO-DATE
[ ] > Task :image_picker:compileDebugAidl NO-SOURCE
[ ] > Task :onesignal_flutter:preBuild UP-TO-DATE
[ ] > Task :onesignal_flutter:preDebugBuild UP-TO-DATE
[ ] > Task :onesignal_flutter:compileDebugAidl NO-SOURCE
[ ] > Task :path_provider:preBuild UP-TO-DATE
[ ] > Task :path_provider:preDebugBuild UP-TO-DATE
[ ] > Task :path_provider:compileDebugAidl NO-SOURCE
[ ] > Task :shared_preferences:preBuild UP-TO-DATE
[ ] > Task :shared_preferences:preDebugBuild UP-TO-DATE
[ ] > Task :shared_preferences:compileDebugAidl NO-SOURCE
[ ] > Task :sqflite:preBuild UP-TO-DATE
[ ] > Task :sqflite:preDebugBuild UP-TO-DATE
[ ] > Task :sqflite:compileDebugAidl NO-SOURCE
[ ] > Task :app:compileDebugAidl NO-SOURCE
[ ] > Task :flutter_plugin_android_lifecycle:packageDebugRenderscript NO-SOURCE
[ ] > Task :google_maps_flutter:packageDebugRenderscript NO-SOURCE
[ ] > Task :image_picker:packageDebugRenderscript NO-SOURCE
[ ] > Task :onesignal_flutter:packageDebugRenderscript NO-SOURCE
[ ] > Task :path_provider:packageDebugRenderscript NO-SOURCE
[ ] > Task :shared_preferences:packageDebugRenderscript NO-SOURCE
[ ] > Task :sqflite:packageDebugRenderscript NO-SOURCE
[ ] > Task :app:compileDebugRenderscript NO-SOURCE
[ ] > Task :app:generateDebugBuildConfig UP-TO-DATE
[ ] > Task :flutter_plugin_android_lifecycle:writeDebugAarMetadata UP-TO-DATE
[ ] > Task :google_maps_flutter:writeDebugAarMetadata UP-TO-DATE
[ ] > Task :image_picker:writeDebugAarMetadata UP-TO-DATE
[ ] > Task :onesignal_flutter:writeDebugAarMetadata UP-TO-DATE
[ ] > Task :path_provider:writeDebugAarMetadata UP-TO-DATE
[ ] > Task :shared_preferences:writeDebugAarMetadata UP-TO-DATE
[ ] > Task :sqflite:writeDebugAarMetadata UP-TO-DATE
[ +74 ms] > Task :app:checkDebugAarMetadata FAILED
[ +1 ms] FAILURE: Build failed with an exception.
[ +2 ms] * What went wrong:
[ ] Execution failed for task ':app:checkDebugAarMetadata'.
[ ] > Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
[ ] > Could not resolve androidx.work:work-runtime:[2.0.0, 2.99.99].
[ ] Required by:
[ ] project :app > project :onesignal_flutter > com.onesignal:OneSignal:4.4.0
[ ] > Failed to list versions for androidx.work:work-runtime.
[ ] > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/androidx/work/work-runtime/maven-metadata.xml.
[ ] > org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
[ ] > Failed to list versions for androidx.work:work-runtime.
[ ] > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/androidx/work/work-runtime/maven-metadata.xml.
[ ] > org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
[ +1 ms] > Failed to list versions for androidx.work:work-runtime.
[ ] > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/androidx/work/work-runtime/maven-metadata.xml.
[ ] > org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
[ ] > Failed to list versions for androidx.work:work-runtime.
[ ] > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/androidx/work/work-runtime/maven-metadata.xml.
[ +1 ms] > org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
[ ] > Failed to list versions for androidx.work:work-runtime.
[ ] > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/androidx/work/work-runtime/maven-metadata.xml.
[ ] > org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
[ ] > Failed to list versions for androidx.work:work-runtime.
[ ] > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/androidx/work/work-runtime/maven-metadata.xml.
[ ] > org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
[ ] > Failed to list versions for androidx.work:work-runtime.
[ ] > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/androidx/work/work-runtime/maven-metadata.xml.
[ ] > org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
[ ] > Failed to list versions for androidx.work:work-runtime.
[ ] > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/androidx/work/work-runtime/maven-metadata.xml.
[ ] > org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
[ ] * 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 42s
[ ] Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
[ ] Use '--warning-mode all' to show the individual deprecation warnings.
[ ] See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
[ ] 11 actionable tasks: 2 executed, 9 up-to-date
[ +598 ms] Running Gradle task 'assembleDebug'... (completed in 43.2s)
[ +2 ms] The build failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetifier to solve the incompatibility.[ +6 ms] Building plugin flutter_plugin_android_lifecycle...
[ +4 ms] Running Gradle task 'assembleAarRelease'...
[ +3 ms] Using gradle from C:\Src\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_plugin_android_lifecycle-2.0.2\android\gradlew.bat.
[ ] executing: [C:\Src\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_plugin_android_lifecycle-2.0.2\android/]
C:\Src\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_plugin_android_lifecycle-2.0.2\android\gradlew.bat
-I=C:\Src\flutter\packages\flutter_tools\gradle\aar_init_script.gradle -Pflutter-root=C:\Src\flutter -Poutput-dir=C:\Code\rehal_app\rehal_app\build\app-Pis-plugin=true -PbuildNumber=1.0 -Pverbose=true -Pdart-obfuscation=false -Ptrack-widget-creation=false -Ptree-shake-icons=false
-Ptarget-platform=android-arm,android-arm64,android-x64 assembleAarRelease
[+2086 ms]
Welcome to Gradle 5.4.1!

                Here are the highlights of this release:
                 - Run builds with JDK12
                 - New API for Incremental Tasks
                 - Updates to native projects, including Swift 5 support

                For more details see https://docs.gradle.org/5.4.1/release-notes.html



                FAILURE: Build failed with an exception.

                * What went wrong:
                Task 'assembleAarRelease' not found in root project 'flutter_plugin_android_lifecycle'.

                * Try:
                Run gradlew tasks to get a list of available tasks. 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 1s

[ +3 ms] Running Gradle task 'assembleAarRelease'... (completed in 2,093ms)
[ ]
Welcome to Gradle 5.4.1!

       Here are the highlights of this release:
        - Run builds with JDK12
        - New API for Incremental Tasks
        - Updates to native projects, including Swift 5 support

       For more details see https://docs.gradle.org/5.4.1/release-notes.html

[ +1 ms]
FAILURE: Build failed with an exception.

       * What went wrong:
       Task 'assembleAarRelease' not found in root project 'flutter_plugin_android_lifecycle'.

       * Try:
       Run gradlew tasks to get a list of available tasks. 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 1s

[ +5 ms] Exception: The plugin flutter_plugin_android_lifecycle could not be built due to the issue above.
[ +1 ms] "flutter run" took 71,034ms.
[ +5 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:663:9)

#2 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1043:27)

#3 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#4 CommandRunner.runCommand (package:args/command_runner.dart:196:13)

#5 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)

#6 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:232:5)

#8 run.. (package:flutter_tools/runner.dart:62:9)

#9 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#10 main (package:flutter_tools/executable.dart:91:3)

@emawby
Copy link
Contributor

emawby commented Aug 6, 2021

@dev-husein I apologize for the inconvenience. Looking quickly online it looks like this is a fairly common issue that can have a lot of different causes and fixes. The error you mention at the top doesn't appear to be in the build log you provided. When are you seeing the error regarding onesignal_flutter:debugCompileClasspath?

If you are able to provide a sample app that includes the issue that would be very helpful!

@dev-husein
Copy link
Author

dev-husein commented Aug 6, 2021

@emawby thanks for responding
here is the main error message :

  FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugAssets'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve androidx.work:work-runtime:[2.0.0, 2.99.99].
     Required by:
         project :app > project :onesignal_flutter > com.onesignal:OneSignal:4.4.0
      > Failed to list versions for androidx.work:work-runtime.
         > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/androidx/work/work-runtime/maven-metadata.xml.
            > org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
      > Failed to list versions for androidx.work:work-runtime.
         > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/androidx/work/work-runtime/maven-metadata.xml.
            > org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
      > Failed to list versions for androidx.work:work-runtime.
         > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/androidx/work/work-runtime/maven-metadata.xml.
            > org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
      > Failed to list versions for androidx.work:work-runtime.
         > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/androidx/work/work-runtime/maven-metadata.xml.
            > org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
      > Failed to list versions for androidx.work:work-runtime.
         > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/androidx/work/work-runtime/maven-metadata.xml.
            > org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
      > Failed to list versions for androidx.work:work-runtime.
         > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/androidx/work/work-runtime/maven-metadata.xml.
            > org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
      > Failed to list versions for androidx.work:work-runtime.
         > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/androidx/work/work-runtime/maven-metadata.xml.
            > org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
      > Failed to list versions for androidx.work:work-runtime.
         > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/androidx/work/work-runtime/maven-metadata.xml.
            > org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.

* 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 45s
The build failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetifier to solve the incompatibility.
Building plugin flutter_plugin_android_lifecycle...
Running Gradle task 'assembleAarRelease'...


FAILURE: Build failed with an exception.

* What went wrong:
Task 'assembleAarRelease' not found in root project 'flutter_plugin_android_lifecycle'.

* Try:
Run gradlew tasks to get a list of available tasks. 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 1s

Exception: The plugin flutter_plugin_android_lifecycle could not be built due to the issue above.

@jkasten2
Copy link
Member

@dev-husein It seems like the URL isn't loading or it's contain is being changed:
https://dl.google.com/dl/android/maven2/androidx/work/work-runtime/maven-metadata.xml

Can you open this URL in a browser? Does it display correctly as XML?

@dev-husein
Copy link
Author

dev-husein commented Aug 12, 2021

@jkasten2 Yes it opens and downloads the xml

@dev-husein
Copy link
Author

The only why i made it run was i deleted my .gradle folder.

It seems it wasn't a onesignal error sorry for any inconveniences.

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