# Creating the APK file - not working yet?

79 replies to this topic

### #61 Kouri

Kouri

GMC Member

• GMC Member
• 157 posts
• Version:GM:Studio

Posted 22 May 2012 - 12:14 PM

Huh, I'm not sure if it was RC4 or reinstalling the SDK, but that Roaming error's gone. Now I'm not so worried about picking up the Android extension, heh.
• 0

### #62 Hitomi

Hitomi

GMC Member

• New Member
• 11 posts
• Version:Unknown

Posted 23 May 2012 - 02:38 PM

Just wanted to chime in on this thread saying that I was having the same problem, and all of the suggestions here weren't working. So I just went to the build.xml file, and the line that was giving me the error was:

So I simply removed the variable and manually added my password and voila! It worked!
• 0

GMC Member

• GMC Member
• 7 posts

Posted 25 May 2012 - 04:07 AM

I had a heck of a time finaly getting past the jarsigning problem.

Finaly, I determined that re-generating the keystore file was NOT replacing the existing keystore.

Browse to the location of your Private Keystore File, the location is in the Android Tab of preferences and will be something like, C:\Users\username\AppData\Local\GameMaker-Studio\AndroidKeystore.keystore and delete it, then regenerate a new keystore file.

You, sir, are my savior!!!
• 0

### #64 GameMakinRyan

GameMakinRyan

GMC Member

• New Member
• 30 posts

Posted 26 May 2012 - 03:25 AM

I've tried all of the above, and it still won't compile - I'm getting this nonsense here:
```BUILD FAILED

Total time: 5 seconds
jarsigner: unable to open jar file: C:\Documents and Settings\Ryan\Local Settings\Temp\gm_ttt_23002\gm_ttt_19463\bin\RunnerActivity-release.apk
Unable to open 'C:\Documents and Settings\Ryan\Local Settings\Temp\gm_ttt_23002\gm_ttt_19463\bin\RunnerActivity-release.apk' as zip archive```

Any ideas on what the issue might be? I followed every single step on the YoyoGames page on how to set up for Android, all of my SDK, JDK, and Keystore info is correct, the passwords are the same for the keystore, I tried generating it, checking everything, then running the JarSigner.exe and I'm still getting this error.
• 0

### #65 kburkhart84

kburkhart84

GMC Member

• GMC Member
• 1611 posts
• Version:GM:Studio

Posted 29 May 2012 - 09:48 PM

One thing that helped in my case was actually removing the keystore files from disk, and regenerating one via GM's dialog. Once I did that, I didn't have any more problems. I'm sure this will only help with the issues involving jarsigner returning -1, not with the SDK targets not being found.
• 0

GMC Member

• GMC Member
• 158 posts
• Version:GM:Studio

Posted 06 June 2012 - 04:29 AM

Yeah, I'm having problems too. I got this:

BUILD FAILED

I was having this one too.
Here what it solved to me:

Unistall SDK... then installed only APIs 7, 8 and 11
Just the> SDK Platform and Google APIs

Hope I helped
• 0

### #67 mmsoft

mmsoft

GMC Member

• New Member
• 4 posts
• Version:GM:HTML5

Posted 20 June 2012 - 05:11 PM

I had a heck of a time finaly getting past the jarsigning problem.

Finaly, I determined that re-generating the keystore file was NOT replacing the existing keystore.

Browse to the location of your Private Keystore File, the location is in the Android Tab of preferences and will be something like, C:\Users\username\AppData\Local\GameMaker-Studio\AndroidKeystore.keystore and delete it, then regenerate a new keystore file.

yes this is a very important part: delete all keystore files before generate a new one....this works for me..i had the same problem....maybe this is a bug of gm
• 0

### #68 Arkon

Arkon

GMC Member

• GMC Member
• 2 posts
• Version:GM:Studio

Posted 28 June 2012 - 05:56 AM

Yeah, I'm having problems too. I got this:

BUILD FAILED

I was having this one too.
Here what it solved to me:

Unistall SDK... then installed only APIs 7, 8 and 11
Just the> SDK Platform and Google APIs

Hope I helped

Didn't help.

I'm having problems too. I got this:

Writing Chunk... AUDO
Writing Chunk... SCPT
Writing Chunk... DBGI
Writing Chunk... STRG

BUILD FAILED

Total time: 0 seconds

• 0

### #69 philippe

philippe

GMC Member

• GMC Member
• 13 posts
• Version:GM:Studio

Posted 08 July 2012 - 12:00 PM

Yeah, I'm having problems too. I got this:

BUILD FAILED

I was having this one too.
Here what it solved to me:

Unistall SDK... then installed only APIs 7, 8 and 11
Just the> SDK Platform and Google APIs

Hope I helped

Didn't help.

I'm having problems too. I got this:

Writing Chunk... AUDO
Writing Chunk... SCPT
Writing Chunk... DBGI
Writing Chunk... STRG

BUILD FAILED

Total time: 0 seconds

Hi,

I had the same, and to resolded it, i had do that :
- Go to you android-sdk directory

- Lauch SDK Manager.exe

- In SDK Manager, in Android 2.2 (API 8) section, check Goolgle APIs

- Click on Install 1 package button !

That's all !

Edited by philippe, 08 July 2012 - 12:01 PM.

• 0

### #70 jcop

jcop

GMC Member

• GMC Member
• 87 posts
• Version:GM:Studio

Posted 18 July 2012 - 03:16 PM

I had the same, and to resolded it, i had do that :
- Go to you android-sdk directory

- Lauch SDK Manager.exe

- In SDK Manager, in Android 2.2 (API 8) section, check Goolgle APIs

- Click on Install 1 package button !

That's all !

I can confirm that on a new setup the directions above worked perfectly and got GMS creating APKs for me. Thanks for posting the tip.
• 0

### #71 jackietuan

jackietuan

GMC Member

• GMC Member
• 3 posts
• Version:GM:Studio

Posted 03 February 2013 - 03:46 AM

I had a similar problem with the "Build Failure" and non of the above solutions worked for me. But I managed to get mine working by accident and here is what I did.

1) Before generating my keystore, just as the guide above, with the 2 passwords being the same. I also ticked "Always do full install of APK"
2) Went to "Global Game Settings"
3) Select "Android" tab
4) Within "Android" tab, go to "Graphics" tab
4) Within "Graphics" tab I selected "Any device supported". I left everything else as they were.

And for some reasons, this worked for me.

Hope this helps.
• 0

### #72 hobbitbabes

hobbitbabes

GMC Member

• GMC Member
• 98 posts
• Version:GM:Studio

Posted 03 February 2013 - 08:19 PM

i also regularly have this problem and what works for me is for me to got to program files/java/java jdk/bin and then double click and run jarsigner then restart game maker studio and it works for me..
• 0

### #73 08lynaell

08lynaell

GMC Member

• New Member
• 2 posts
• Version:GM:Studio

Posted 09 March 2013 - 04:27 PM

I had a heck of a time finaly getting past the jarsigning problem.

Finaly, I determined that re-generating the keystore file was NOT replacing the existing keystore.

Browse to the location of your Private Keystore File, the location is in the Android Tab of preferences and will be something like, C:\Users\username\AppData\Local\GameMaker-Studio\AndroidKeystore.keystore and delete it, then regenerate a new keystore file.

that did it for me. Grr...that along with reinstalling, reupdating, generating it the way told....and then saving it to the project folder.... grrr... what a frustration!

Here is where it says the error has been, like the line of code on the build.xml file...

```<do-only-if-not-library elseText="Library project: do not create apk..." >
<sequential>
<property name="out.unaligned.file" location="\${out.absolute.dir}/\${ant.project.name}-release-unaligned.apk" />

<!-- Signs the APK -->
<echo>Signing final apk...</echo>
<signjar
jar="\${out.packaged.file}"
signedjar="\${out.unaligned.file}"
keystore="\${key.store}"
alias="\${key.alias}"
verbose="\${verbose}" />```

Could you please edit the build file and email it to me at playgames2011@live.co.uk, help would be appreciated
• 0

### #74 proon

proon

GMC Member

• GMC Member
• 44 posts
• Version:GM:Studio

Posted 11 March 2013 - 10:09 AM

After the latest update when i build my apk this appears in the build:

[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Recompile with -Xlint:unchecked for details.

Then it says build succefully and the apk has only 4mbs (it's 18mbs) and when i run it a black screen appears and returns to the home screen
• 0

### #75 G-Games

G-Games

GMC Member

• GMC Member
• 501 posts
• Version:GM8

Posted 07 April 2013 - 05:47 PM

Decided to come back to this topic because I also have a problem (never seen this one before though):

Writing Chunk... DBGI

Writing Chunk... STRG

[javac] Note: Some input files use or override a deprecated API.

[javac] Note: Recompile with -Xlint:deprecation for details.

BUILD FAILED

C:\***\Documents\Quackertree Studios\Android SDK\sdk\tools\ant\build.xml:881: The following error occurred while executing this line:

C:\***\Documents\Quackertree Studios\Android SDK\sdk\tools\ant\build.xml:883: The following error occurred while executing this line:

C:\***\Documents\Quackertree Studios\Android SDK\sdk\tools\ant\build.xml:895: The following error occurred while executing this line:

C:\***\Documents\Quackertree Studios\Android SDK\sdk\tools\ant\build.xml:290: null returned: 2

Anyone any ideas on how to solve this?

• 0

### #76 sebastiankit

sebastiankit

• GMC Member
• 241 posts
• Version:GM:Studio

Posted 10 April 2013 - 01:40 PM

Update Game Maker.

• 0

### #77 Armalitus

Armalitus

GMC Member

• New Member
• 12 posts
• Version:GM:Studio

Posted 14 April 2013 - 06:07 PM

I am having the exact same issue as G-Games.

Writing Chunk... DBGI

Writing Chunk... STRG

[javac] Note: Some input files use or override a deprecated API.

[javac] Note: Recompile with -Xlint:deprecation for details.

BUILD FAILED

C:\***\Documents\Quackertree Studios\Android SDK\sdk\tools\ant\build.xml:881: The following error occurred while executing this line:

C:\***\Documents\Quackertree Studios\Android SDK\sdk\tools\ant\build.xml:883: The following error occurred while executing this line:

C:\***\Documents\Quackertree Studios\Android SDK\sdk\tools\ant\build.xml:895: The following error occurred while executing this line:

C:\***\Documents\Quackertree Studios\Android SDK\sdk\tools\ant\build.xml:290: null returned: 2

I have poured over this thread(it appears to be the only online resource even close to this issue), and have tried every theory.

I have brand new downloads/installs of the Android MIPS Edition(v1.1.747), JDK(1.7.0_17), and SDK with all API's installed(only installed the ones that were asked for at first, filled in the rest later). As I said, every previously mentioned theory/fix has been tried.

There is a 1-2 minute wait between the [javac] Notes and BUILD FAILED

• 0

### #78 G-Games

G-Games

GMC Member

• GMC Member
• 501 posts
• Version:GM8

Posted 15 April 2013 - 05:05 PM

The solution is the GoogleAdMobAdsSdk-6.1.0.jar file which seems to be gone once I've updated. Reinstall + NOT updating fixed it for me. So, if you find that file, everything should be working again.

• 0

### #79 Armalitus

Armalitus

GMC Member

• New Member
• 12 posts
• Version:GM:Studio

Posted 20 April 2013 - 09:57 PM

I have replaced it with GoogleAdMobAdsSdk-6.3.1 from my Andoid SDK folder. I still recieve the same error:

Writing Chunk... STRG
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.

BUILD FAILED
C:\Android\android-sdk\tools\ant\build.xml:881: The following error occurred while executing this line:
C:\Android\android-sdk\tools\ant\build.xml:883: The following error occurred while executing this line:
C:\Android\android-sdk\tools\ant\build.xml:895: The following error occurred while executing this line:
C:\Android\android-sdk\tools\ant\build.xml:290: null returned: 2

Total time: 1 minute 12 seconds

////I will now attempt to try this "fix" in conjunction with all of the other "fixes" I've tried in this thread.

• 0

### #80 Armalitus

Armalitus

GMC Member

• New Member
• 12 posts
• Version:GM:Studio

Posted 20 April 2013 - 10:07 PM

After "downgrading" from beta to stable, the APK build worked. I had forgotten that it was even a variable.