flutter-unity-view-widget
flutter-unity-view-widget copied to clipboard
Error when Build an APK for Android
I just trying to build my projects into APK, but it failed. What should i do?
This is error in terminal:
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':app:lintVitalRelease'.
Could not resolve all artifacts for configuration ':flutter_unity_widget:profileRuntimeClasspath'. 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 a runtime of a component, 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: - Incompatible because this component declares an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a runtime of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'profile' - Other compatible attribute: - 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 compone - Other compatible attribute: - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm') - Variant 'releaseApiElements' capability android:unityLibrary:unspecified: - Incompatible because this component declares an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a runtime of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'profile' - Other compatible attribute: - 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 attribute: - 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
Need to open the unit project and import FlutterUnityPackage.unitypckage, and then export "Flutter"->"Export Android"
Have you followed all the steps in the readme?