Deployment

Monkey Targets Forums/Android/Deployment

Jimbo(Posted 2012) [#1]
The docs seem to be a bit short on the exact requirements for deploying to a device for testing, and forgive me for asking what may be obvious questions!

1) Which files need to be deployed to the device? Just the .APK file or other files as well? I can test quite easily since the new Chinese tablet I bought has a full-size USB port and will handle pen-drives, and this saves a lot of messing. But what exactly from the ant output do I need?

2) If I specify release instead of debug, why does Jungle/Monk/Trans only produce a debug APK? Or if it does produce a release, where is it? The bin folder contains a lot of files!


therevills(Posted 2012) [#2]
If you've got your device connected and installed correctly to your computer, you should be able to get Monkey to deploy automatically to your device.

The finished artifact is the apk file, it will contain all your resources.

Don't worry about the name of the apk file and I would only run the release version, as the debug version is very very slow.


Jimbo(Posted 2012) [#3]
Thanks therevills. But where is the release version!


Jesse(Posted 2012) [#4]
in the Monk IDE select
Program->Build Options and uncheck "Debug Buid" the new build will replace the debug one.


Xaron(Posted 2012) [#5]
1. Find your apk file (yourproject.build/android/bin), open it using WinRAR and delete the META-INF folder (this is where the debug key is stored)
2. Create the key for your app:
2a. Create a folder called "keytools" and make a folder in that called "keys"
2b. Open command prompt (cmd.exe)
2c. Navigate to your keytools folder
2d. Type the following:
C:\"Program Files"\Java\jdk1.6.0_24\bin\keytool -genkey -alias yourProject.keystore -keyalg RSA -validity 20000 -keystore keys/yourProject.keystore

2e. Answer the questions prompted.
2f. Sign the apk:
C:\"Program Files"\Java\jdk1.6.0_24\bin\jarsigner -verbose -keystore keys/yourProject.keystore -signedjar yourProject-signed.apk yourProject.apk yourProject.keystore

2g. Zip align the apk:
C:\"Program Files (x86)"\Android\android-sdk\tools\zipalign -v 4 yourProject-signed.apk yourProject-signed-zipped.apk

3. In the Android Developer Console, click Upload Application
4. Fill out and upload details, screen shots and your signed and aligned apk

Done


Jimbo(Posted 2012) [#6]
Thanks all for the advice. I think I might try to automate that a bit!

Still puzzled as to why the release version doesn't appear, unless it's the file with .ap_ as its extension.


therevills(Posted 2012) [#7]
The release version will still be have "debug" in the name.


golomp(Posted 2012) [#8]
Hi,

I am actually making some try of deployment and i still have problem of
signing any app for Android.

Thank you for your ideas, i continue my tests on my little app


therevills(Posted 2012) [#9]
at the end of installation i have an error message
on my phone and it cancel installation.


It would help if you told us the error message you got ;)


golomp(Posted 2012) [#10]
Xcuse me...

The message is in french : "La signature du fichier du package est incorrecte"

I think in english it should be translated as "Package File's signing is not correct"


therevills(Posted 2012) [#11]
Try following these instructions:

http://www.monkeycoder.co.nz/Community/post.php?topic=1014&post=8800


golomp(Posted 2012) [#12]
Sorry to have disturb you pals.

The problem is solved, i am going to continue but i think every thing is ok now...

It was a bug from Google Developper Console Server, probably due to to much connexion...
Apparently this problem affect country at different hours...

Thanks a lot...


3Dski(Posted 2014) [#13]
Just want to offer up another thanks for the instructions on deployment and how to properly sign an application. I've been distracted from development for awhile and never really got to a point of developing anything useful and deploying to an Android platform. Lately, I've played with Corona a bit to get a feel for it, and now want to come back to Monkey for comparison.


Gerry Quinn(Posted 2014) [#14]
You can just copy the debug version of the APK across and install it for testing purposes. You don't need to do the signing until your ready to release.