• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android (Solved) Problem with *.aar files at extension

u1ambient

Member
Is there a way to compile project with *.aar files at extension?

I trying create extension. It use *.jar and *.aar files. If *.aar is in a folder "libs", compilation fails:
System.IO.IOException: The file 'Z:/game_531CA3FB_689AB3CD\Android\default\game.***.***\elibs/adcolony-3.3.5.\adcolony-3.3.5.aar' already exists.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
at System.IO.File.Copy(String sourceFileName, String destFileName)
at Igor.AndroidUtils.(YYDictionary`2 , String )
at Igor.AndroidUtils.(YYDictionary`2 , String , Boolean , String )
at Igor.AndroidBuilder.Package()
Igor complete.
But if *.aar is in a separate folder "libs-aar" and adding to build.grandle following code, it doesn't work anyway:
repositories {
flatDir {
dirs 'libs-aar'
}
...
}

dependencies {
compile(name: 'adcolony-3.3.5', ext: 'aar')
...
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':game.***.***'.
> Could not resolve all dependencies for configuration ':game.***.***:_debugApkCopy'.
> Could not find :adcolony-3.3.5:.
At the same time I can compile project with adcolony adding to grandle:
repositories
{
maven {url "https://adcolony.bintray.com/AdColony"}
....
}

dependencies {
compile(name: 'adcolony-3.3.5', ext: 'aar')
...
But I also need others SDK, which are only *.aar files. Its possible at GameMaker Studio 2?
 

u1ambient

Member
This problem solved:

in extension-section "Inject to Grandle dependencies" I added
compile(name: 'adcolony-sdk-3.3.5', ext: 'aar')

repositories
{
flatDir {
dirs 'libs-aar'
}
}
and create folder "libs-aar" with the *.aar files in C:\ProgramData\GameMakerStudio2\Cache\runtimes\runtime-2.2.1.287\android\runner\ProjectFiles\

Additionally, I added abiFilters (Adcolony uses all types of architectures, but I need only two of them) in build.grandle (which in ProjectFiles) in section "buildTypes":
buildTypes {
release {
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a'
}
...
Maybe, this will be useful for someone
 
T

Tony Bratton

Guest
Thank you for posting this and putting the solution there. We ran into this exact problem and this saved our team some headache!
 
Top