# Gradle build failure when packaging GooglePAD asset packs

**URL:** <https://forums.unrealengine.com/t/gradle-build-failure-when-packaging-googlepad-asset-packs/489469>\
**Category:** Mobile\
**Tags:** gradle, google, build, unreal-engine, Android, Packaging, question\
**Created:** [October 3, 2021, 5:53am UTC](https://forums.unrealengine.com/t/gradle-build-failure-when-packaging-googlepad-asset-packs/489469 "2021-10-03T05:53:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RockJB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RockJB](https://forums.unrealengine.com/u/RockJB)\
**Post date:** [October 3, 2021, 5:53am UTC](https://forums.unrealengine.com/t/gradle-build-failure-when-packaging-googlepad-asset-packs/489469/1 "2021-10-03T05:53:41Z")

</div>

I have followed [this guide](https://docs.unrealengine.com/4.27/en-US/SharingAndReleasing/Mobile/Android/Distribution/GooglePlayAssetDeliveryReference/) to implement the GooglePAD plugin in UE 4.27, but I’m met with the following error when I try to package the project for the second time (first time generates the asset packs):

```
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 :assetpacks:on-demand:OnDemandPack.
     Required by:
         project :app
      > Project :app declares a dependency from configuration 'assetPackFiles' to configuration 'packElements' which is not declared in the descriptor for project :assetpacks:on-demand:OnDemandPack.

```

This happens with all 3 of my on-demand packs. The `build.gradle` file inside the asset pack folders is exactly the same as the one included in the guide, though I have tried just writing the pack names as shown [here](https://developer.android.com/codelabs/native-gamepad#3) to no avail.

What should I do to build successfully with this plugin?

---

<div class="post-metadata">

**Author:** ![Alex.Kang](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alex.Kang](https://forums.unrealengine.com/u/Alex.Kang)\
**Post date:** [October 3, 2021, 9:40am UTC](https://forums.unrealengine.com/t/gradle-build-failure-when-packaging-googlepad-asset-packs/489469/2 "2021-10-03T09:40:04Z")

</div>

I have same issue.  
this problem happened only when there is .pak file on Build/Android/gradle/assetpaks folder  
I think this is regression issue or sdk version mismatch issue. it worked fine on 4.26.1

---

<div class="post-metadata">

**Author:** ![BoogTheGamer7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BoogTheGamer7](https://forums.unrealengine.com/u/BoogTheGamer7)\
**Post date:** [March 22, 2023, 4:05am UTC](https://forums.unrealengine.com/t/gradle-build-failure-when-packaging-googlepad-asset-packs/489469/3 "2023-03-22T04:05:32Z")

</div>

has anyone figured out the solution to this?? I’m having the same issue

---

<div class="post-metadata">

**Author:** ![Ericho](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ericho/32/986322_2.png) [@Ericho](https://forums.unrealengine.com/u/Ericho)\
**Post date:** [March 24, 2023, 12:36pm UTC](https://forums.unrealengine.com/t/gradle-build-failure-when-packaging-googlepad-asset-packs/489469/4 "2023-03-24T12:36:47Z")

</div>

Check out the documentations I made for a product: [DOCS](https://drive.google.com/file/d/1cYPrMJrzAMU5QYJgEHBWkbylIplBi84x/view?usp=sharing), page 18 explains where to place PAK files and page 19 is about having to package twice due to unreal engines internal structure.

A lot of other useful information in the document about all things related to GooglePAD (Not the implementation itself though, as that isn’t required for the product to work.)

Hope it helps!

EDIT: Updated the link. Seems to have died.
