pavelzaichyk / flutter_unity_ads

Unity Ads plugin for Flutter Applications. This plugin is able to display Unity Banner Ads and Unity Video Ads.
https://pub.dev/packages/unity_ads_plugin
MIT License
30 stars 12 forks source link

FAILURE: Build failed with an exception. #33

Closed hicach99 closed 1 month ago

hicach99 commented 1 year ago

I am building an app not a game. but when implementing UnityAds i got this build error. I Don't hnow what'is wrong some one help.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':unity_ads_plugin:parseDebugLocalResources'.
> Could not resolve all files for configuration ':unity_ads_plugin:androidApis'.
   > Failed to transform android.jar to match attributes {artifactType=android-platform-attr, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for PlatformAttrTransform: C:\Android\android-sdk\platforms\android-30\android.jar.
         > C:\Android\android-sdk\platforms\android-30\android.jar

* 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 32s
>Running Gradle task 'assembleDebug'...                             33.7s
>Exception: Gradle task assembleDebug failed with exit code 1
shivsidan commented 1 year ago

I am having the same issue - did you fixt it? if yes, please let me know

Mayank985 commented 8 months ago

Try this, It might help

Added this in this package's android/build.gradle file (dependencies section) implementation "androidx.core:core-ktx:1.6.0"

and this at very end in the same build gradle file. Somehow it got solved. configurations.all { resolutionStrategy { force 'androidx.core:core-ktx:1.6.0' } }

I was stuck for very long. hope anyone else don't have to

NoOne696969 commented 4 months ago

@Mayank985 I cannot dind the package folder for unity in my project

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 month ago

This issue was closed because it has been inactive for 14 days since being marked as stale.