Skip to content

Unity Widget does not allow the use of the Flutter --profile flag #527

Open
@johnfriedrich

Description

@johnfriedrich

Describe the bug
Not possible to use the Flutter --profile flag to profile the app.

To Reproduce
Steps to reproduce the behavior:
Try to run the app with the --profile flag

This error pops up:

Running Gradle task 'assembleProfile'...

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':flutter_unity_widget:compileProfileAidl'.
> Could not resolve all task dependencies for configuration ':flutter_unity_widget:profileCompileClasspath'.
   > Could not resolve project :unityLibrary.
     Required by:
         project :flutter_unity_widget
      > No matching variant of project :unityLibrary was found. The consumer was configured to find an API of a component, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'profile', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
          - Variant 'debugApiElements' capability android:unityLibrary:unspecified declares an API of a component:
              - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'profile'
              - Other compatible attributes:
                  - Doesn't say anything about its target Java environment (preferred optimized for Android)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
          - Variant 'debugRuntimeElements' capability android:unityLibrary:unspecified declares a runtime of a component:
              - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'profile'
              - Other compatible attributes:
                  - Doesn't say anything about its target Java environment (preferred optimized for Android)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
          - Variant 'releaseApiElements' capability android:unityLibrary:unspecified declares an API of a component:
              - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'profile'
              - Other compatible attributes:
                  - Doesn't say anything about its target Java environment (preferred optimized for Android)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
          - Variant 'releaseRuntimeElements' capability android:unityLibrary:unspecified declares a runtime of a component:
              - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'profile'
              - Other compatible attributes:
                  - Doesn't say anything about its target Java environment (preferred optimized for Android)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')

* 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
Exception: Gradle task assembleProfile failed with exit code 1

Expected behavior
You should be able to profile the Flutter application

Screenshots

Unity (please complete the following information):

  • OS: Windows Standalone Android Studio
  • Version [e.g. 22]

Smartphone (please complete the following information):

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BuildThis issue refers to the build configuration and builds failing.androidThis issue is specific to the Android Platform.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions