Skip to content

Build fail if unity switched to Unity 6 preview #962

@TNemecek

Description

@TNemecek

Describe the bug
When switching to the Unity 6, build fails in unity with this error:

Launching lib\main.dart on ASUS Z017D in debug mode...
Running Gradle task 'assembleDebug'...
You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply


FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file 'C:\Projects\UNITY projects\improvio\android\unityLibrary\build.gradle' line: 2

* What went wrong:
A problem occurred evaluating project ':unityLibrary'.
> Could not read script 'C:\Projects\UNITY projects\improvio\android\shared\keepUnitySymbols.gradle' as it does not exist.

* 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: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':unityLibrary'.
> compileSdkVersion is not specified. Please add it to build.gradle

* 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 1s
Error: Gradle task assembleDebug failed with exit code 1

To Reproduce
Steps to reproduce the behavior:

  1. Switch unity version to 6 (preview)
  2. Build release flutter from unity
  3. Build flutter app
  4. See error when build failed

Expected behavior
Build app

Screenshots
image

Unity (please complete the following information):

  • OS: Windows 11
  • Unity 6 Preview

Smartphone (please complete the following information):

  • Device: Asus
  • OS: Android
  • Version 8

Additional context
It may be still preview, bud it appears that it will need some changes to fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions