Dave Nottage
Dave Nottage

Reputation: 3612

Gradle error when creating asset packs for Android app

I have followed the steps here to create asset packs for an Android app, except that at step 8 I am receiving the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:assetPackDebugPreBundleTask'.
> Could not resolve all task dependencies for configuration ':app:assetPackFiles'.
   > Could not resolve project :installtime_assetpack.
     Required by:
         project :app
      > Project :app declares a dependency from configuration 'assetPackFiles' to configuration 'packElements' which is not declared in the descriptor for project :installtime_assetpack.

Gradle is reporting version 6.5. Has something changed that I need to add something else?

Upvotes: 1

Views: 1328

Answers (2)

Aliex
Aliex

Reputation: 1

If you still have same issue just try to rename your gradle.build (in folder of your assetpack) to build.gradle - it seems stupid but it helped me. Also you can take a look to a similar file in the \Intermediate\Android\gradle\assetpacks\install-time\obbassets, and see what the name of that gradle file.

Upvotes: 0

Dave Nottage
Dave Nottage

Reputation: 3612

I was going to delete this question, however I figured someone might make the same bone-head error as I did, which was to have the wrong folder name for one of the assets, i.e. I had installtime_asset_pack when it should have been installtime_assetpack

Upvotes: 2

Related Questions