android offline build

470 views
Skip to first unread message

Rachid

unread,
Feb 10, 2013, 6:46:35 AM2/10/13
to codenameone...@googlegroups.com
Hi all,

some one tried android local build?

Regards,

Eric Coolman

unread,
Feb 10, 2013, 9:54:37 AM2/10/13
to codenameone...@googlegroups.com
Android is actually the easiest platform to deal with for local builds.  Part of the process is similar to the IOS local builds, in that you'd copy the Codename One API, Android Port, and application sources to a single directory.  You'll need an Android Stub, and an AndroidManifest.xml (search the forums for these, both have been posted in the past).  The Codename One resource file needs to go into an assets folder.  The steps from there are the same as building a non-C1 android app - convert the classes to dex format using the ADK dx tool, then package the app to an APK file using the ADK AAPT tool, and finally sign your app using the JDK JarSigner tool.

Eric

Rachid

unread,
Feb 10, 2013, 9:58:09 AM2/10/13
to codenameone...@googlegroups.com
Thanks Eric.

I'll try it.



2013/2/10 Eric Coolman <181...@coolman.ca>
--
--
You received this message because you are subscribed to the Google
Groups "CodenameOne Discussions" group.
 
For more information about Codename One please visit http://www.codenameone.com/
 
To post to this group, send email to
codenameone...@googlegroups.com
To unsubscribe from this group, send email to
codenameone-discu...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/codenameone-discussions?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Steve Hannah

unread,
Feb 10, 2013, 11:55:17 AM2/10/13
to codenameone...@googlegroups.com
I have included an android local build script in my offline build
tools in the incubator. It works exactly as eric described.. it just
adds an ant task to your project for this.

One thing that is missing (both in Eric's instructions and my ant
task) is a couple of stub files for handling intents. One thing that
won't work is the camera for this reason (because it isn't set up to
handle the passing off to the camera Activity and receive control back
properly). If you use "include source" on the build server you will
see these files. I just haven't had time to work on generating them
for the offline build as I only use offline builds for debugging
purposes --- haven't needed it.

Another omission is support for native interfaces... a small amount of
code needs to be added to stitch together native interfaces that you
may have included in your app. This works on the iOS offline build
but not on the Android one yet.

The offline build project can be obtained from SVN
http://codenameone-incubator.googlecode.com/svn/trunk/shannah/offline-build-tools

Readme at:
http://code.google.com/p/codenameone-incubator/source/browse/trunk/shannah/offline-build-tools/readme.txt

Steve
--
Steve Hannah
Web Lite Solutions Corp.

Rachid

unread,
Feb 11, 2013, 5:36:43 AM2/11/13
to codenameone...@googlegroups.com
Thanks all.

I did an offline build for android, I didn't yet test the apk but it should be ok...

I have an error durring ant install, i think it's because I don't have IOS. so I have commented the block for XMLVM on build.xml and all is ok.

        <!-- Now patch XMLVM
        <replace file="${xmlvm.path}/lib/redlist.txt" token="java.nio.CharSequenceAdapter" value=""/>
       
        <exec executable="ant" dir="${xmlvm.path}"/>
        <exec executable="ant" dir="${xmlvm.path}">
            <arg value="install"/>
            <arg line="'-Dxmlvm.install=${xmlvm.install.path}'"/>
        </exec>
        -->


Is it possible to generate the android source code?


Phil Blandford

unread,
Mar 20, 2013, 8:17:39 AM3/20/13
to codenameone...@googlegroups.com
Sorry to resurrect an ancient thread, but is there any update on native interface support for Android offline builds? Or perhaps some instructions for doing it manually?

infobest...@gmail.com

unread,
Jul 8, 2014, 10:03:06 AM7/8/14
to codenameone...@googlegroups.com
Is it possible to get more information of how to pack all this for the offline local Adroid build to work? I have installed the offline tool, included the generated iosbuild.xml into codenameone build.xml but the build process does not find AndroidManifest and android packages. Thanks and best regards,

Cristian

Steve Hannah

unread,
Jul 8, 2014, 12:36:38 PM7/8/14
to codenameone...@googlegroups.com
HI Cristian,

I answered the question you asked about this on my blog.  Short version here for the benefit of future readers.  The offline builds project is old and hasn't been kept up to date.  Android builds aren't working right now. I have created a new Netbeans module for offline iOS builds but nothing for Android at this time.

Steve


--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.

ArSi

unread,
Aug 22, 2017, 8:40:24 AM8/22/17
to CodenameOne Discussions
Hi,
I created a new Netbeans plugin for Android offline builds:

https://sourceforge.net/projects/cn1offandrnb/


Features:

  • Gradle build
  • On Save sync
  • You can open the project direct in Android studio
  • CN1 native support
  • Library sync

ArSi

Shai Almog

unread,
Aug 23, 2017, 1:33:41 AM8/23/17
to CodenameOne Discussions, ars...@gmail.com
Hi,
why sourceforge and not github?

ArSi

unread,
Aug 23, 2017, 2:34:28 AM8/23/17
to CodenameOne Discussions
Hi,

Sourceforge supports mercurial repo...

ars...@gmail.com

unread,
Nov 5, 2017, 6:28:18 AM11/5/17
to CodenameOne Discussions
Hi,

The new 01.15 version is out:

Gradle update to 3.5
Html sync action.

Collaboration with NBANDROID-V2 - Netbeans Android support

cn1-offline-android
NBANDROID-V2
cn1-offline-android and NBANDROID-V2 in action..

btw: github mirror https://github.com/arsi-apli/cn1-offline-android

Arsi


Reply all
Reply to author
Forward
0 new messages