Re: [android-developers] Re: apkbuilder ?
I help to maintain the SBT (http://code.google.com/p/simple-build-tool/) plugin for Android, which is available here: https://github.com/jberkel/android-plugin and would like to bring it up to date with respect to apkbuilder. If I understand what you've said correctly, part of what would be required to make this really work is to factor out the common library build pieces from the Ant tasks and the Eclipse plugin into the sdklib, or at least to figure out what they're doing and duplicate it in the SBT plugin in order provide library support there. I can devote a couple of days to this. Something that would would be very helpful would be rough pointers to the parts of the Ant and Eclipse libraries that interact with ApkBuilder, or if you have the time a couple of quick notes as to what considerations are important when building library projects. Thanks! Kris -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: apkbuilder ?
Actually, I think I found a good model for how to approach the work here for SBT; the Maven android plugin went through the same transition, and it looks like it'll serve admirably as a model. For anyone else who might be interested in how to go about this, check out this commit: https://github.com/cescoffier/maven-android-plugin/commit/858df7a989ce5c5cb526a472c4f57953361d2f46 Kris -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: apkbuilder ?
Argh you people are unbelievable! WHAT is the replacement? WHAT ant command should I call, or failing that WHAT Java class can I start other than ApkBuilderMain? Seriously, it's great to put a massive deprecation notice into everyone's build script, but at some stage people might want to know how to get rid of it! I'm no expert on Android, just trying to get started using the tools for my IDE. I'm sorry, but this is like the 18 trillionth thread I've found saying yes, yes, it IS deprecated, isn't it... FOR THE LOVE OF ALL THAT IS SACRED WHAT REPLACED IT??? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: apkbuilder ?
If you're just getting started you really shouldn't try to make your own build scripts. Therefore you should use the normal Ant build system, or Eclipse. Lots of info at http://developer.android.com/guide/developing/other-ide.html and http://developer.android.com/guide/developing/eclipse-adt.html Xav On Thu, Jan 27, 2011 at 3:27 AM, Bachowny Plamborgs bacho...@gmail.com wrote: Argh you people are unbelievable! WHAT is the replacement? WHAT ant command should I call, or failing that WHAT Java class can I start other than ApkBuilderMain? Seriously, it's great to put a massive deprecation notice into everyone's build script, but at some stage people might want to know how to get rid of it! I'm no expert on Android, just trying to get started using the tools for my IDE. I'm sorry, but this is like the 18 trillionth thread I've found saying yes, yes, it IS deprecated, isn't it... FOR THE LOVE OF ALL THAT IS SACRED WHAT REPLACED IT??? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Xavier Ducrohet Android SDK Tech Lead Google Inc. http://developer.android.com | http://tools.android.com Please do not send me questions directly. Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: apkbuilder ?
Thanks Mark. I've looked there and I also downloaded the Android src (hence the delay before this reply). From the command line (or a Makefile) I end up in the apkbuilder script, this does little except starting com.android.sdklib.build.ApkBuilderMain . The ApkBuilderMain appears to be very thin : it basically calls ApkBuilder in one of several ways. And it prints the warning that triggered me. It looks like Ant has its own stuff in ApkBuilderTask.java, bypassing ApkBuilderMain and thus no warning. Conclusion seems to be that this is a wild goose chase : there's very little I can do right now except ignoring the message. Is this the right conclusion or am I missing something ? Can someone note that leaving such messages (pointing to --help which isn't there) confuses people ? Thanks, Danny On Dec 21, 10:11 am, Mark Murphy mmur...@commonsware.com wrote: Step #1: Visithttp://www.google.com/codesearch Step #2: Search on: package:android ApkBuilder On Tue, Dec 21, 2010 at 3:17 AM, Danny Backx da...@backx.info wrote: apkbuilder says THIS TOOL IS DEPRECATED (caps not mine). When I run it from the command line, without any options, it says (cut somewhat) : If you wish to use apkbuilder for a custom build system, please look at the com.android.sdklib.build.ApkBuilder which provides support for recent build improvements including library projects. So can someone tell me how/where to look at this ? Thanks, Danny -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: apkbuilder ?
On Thu, Dec 23, 2010 at 3:14 AM, Danny Backx da...@backx.info wrote: Can someone note that leaving such messages (pointing to --help which isn't there) confuses people ? You might try http://tools.android.com/feedback and open an issue. It is possible somebody on the tools team will see this thread, but it's not assured. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: apkbuilder ?
The message you get running apkbuilder is a bit misleading I agree. I've been very tempted to simply remove the tool but I'm sure that would annoy more people. The issues is that apkbuilder (the script) is just not maintained at all because neither Ant, nor Eclipse use it. With the introduction of library project, this final step in build android applications has become more complex and requires more parameters to be passed to com.android.sdklib.build.ApkBuilder. Since the default build system doesn't use the apkbuilder script, we haven't added all those new parameters to apkbuilder. At this time we simply don't have the resources to support people who want to use their own build system, but we really wish we could. In many ways we try to make it easy on other tools vendor by clearly separating logic to eclipse or ant specific code (hence the multitude of jar files everywhere in the tools and in ADT), but this is not one of them. The biggest issue would be to extract the logic to deal with library projects and package that with sdklib somehow (there's a lot in ADT and in the Ant custom tasks right now) so that we could build a new ApkbuilderMain that can handle libraries somewhat automatically. Unless someone is willing to contribute this, it's unlikely to happen for a while (if ever) though. Xav -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: apkbuilder ?
Thanks for this very clear message. I've been meaning to look into the library stuff. You might just have tempted me. Danny On Dec 23, 10:35 am, Xavier Ducrohet x...@android.com wrote: The message you get running apkbuilder is a bit misleading I agree. I've been very tempted to simply remove the tool but I'm sure that would annoy more people. The issues is that apkbuilder (the script) is just not maintained at all because neither Ant, nor Eclipse use it. With the introduction of library project, this final step in build android applications has become more complex and requires more parameters to be passed to com.android.sdklib.build.ApkBuilder. Since the default build system doesn't use the apkbuilder script, we haven't added all those new parameters to apkbuilder. At this time we simply don't have the resources to support people who want to use their own build system, but we really wish we could. In many ways we try to make it easy on other tools vendor by clearly separating logic to eclipse or ant specific code (hence the multitude of jar files everywhere in the tools and in ADT), but this is not one of them. The biggest issue would be to extract the logic to deal with library projects and package that with sdklib somehow (there's a lot in ADT and in the Ant custom tasks right now) so that we could build a new ApkbuilderMain that can handle libraries somewhat automatically. Unless someone is willing to contribute this, it's unlikely to happen for a while (if ever) though. Xav -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Apkbuilder problems with new android SDK tools revision 7
Thanks Lance, unfortunatelly this has passed to another problem. I did something similar to what you describe and at the moment the build is SUCCESSFULL, which we can be happy. But now we have another problem which makes us sad again. The problem is that when I install the apk file in the phone the phone shows me a popUp with the message saying that the application cannot be installed. For some reason, some times, the file classes.dex, is not included in the apk file generated even when the dex / file attribute is set, and this file is added the package does not work. Im really new at ant Tasks and stuff, let me know if there is another documentation other than the ant_rules that I can read, like android SDK tools revision 7 release notes. Thanks for all your help and please excuse my english. Claudio n Sep 15, 2:04 am, Lance Nanek lna...@gmail.com wrote: You are missing the new resourcefile attribute on apkbuilder. Also, the value you are using for apkfilepath looks weird as well. Did you just copy it from what you were using for the old basename attribute? It probably won't break due to that, but if you want the same behavior as before you should append -debug.apk or -unsigned.apk to the value you are passing to the replacement attribute depending on if you are signing or not. On Sep 14, 10:32 am, Claudio Veas claudio.v...@gmail.com wrote: Hello Group, Im having a problem with my ant task that I use to compile my project. The build.xml that I was using with revision 6 of the SDK stopped working after the upgrade of the SDK tools to revision 7 and I havent been able to figure why this happen, all I know is that certain task attributes where deprecated and some warnings came up but when executig apkbuilder, a NulPointerException is thrown and I have not been able to see why. BTW, I already fixed the warnings of the deprecated tasks so that was not the problem. -package-debug-sign: [apkbuilder] Creating android-build and signing it with a debug key... BUILD FAILED ..\build.xml:349: The following error occurred while executing this line: ..\build.xml:206: java.lang.NullPointerException Line 349 is target name=-package-debug-sign depends=-dex, -package- resources package-helper sign.package=true / -- This one /target and Line 246 is macrodef name=package-helper attribute name=sign.package / element name=extra-jars optional=yes / sequential apkbuilder outfolder=${out.absolute.dir} apkfilepath=${ant.project.name} signed=@{sign.package} verbose=${verbose} -- This one dex path=${intermediate.dex.file}/ sourcefolder path=${source.absolute.dir} / nativefolder path=${native.libs.absolute.dir} / jarfolder path=${external.libs.absolute.dir} / /apkbuilder /sequential /macrodef I really hope you can help me. If you know why revision 7 of the sdk has this problems or at leas if you know how I can go back to revision 6 I would really apreciate ir. Thanks in advance Claudio Veas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Apkbuilder problems with new android SDK tools revision 7
I recommend you use the 'android' tool in r7 to generate a new build.xml and then carefully incorporate any pieces from the old script that are needed. Alternatively, the android tool has an option to update an old project. Let us know if that works. On Sep 17, 8:06 am, Claudio Veas claudio.v...@gmail.com wrote: Thanks Lance, unfortunatelly this has passed to another problem. I did something similar to what you describe and at the moment the build is SUCCESSFULL, which we can be happy. But now we have another problem which makes us sad again. The problem is that when I install the apk file in the phone the phone shows me a popUp with the message saying that the application cannot be installed. For some reason, some times, the file classes.dex, is not included in the apk file generated even when the dex / file attribute is set, and this file is added the package does not work. Im really new at ant Tasks and stuff, let me know if there is another documentation other than the ant_rules that I can read, like android SDK tools revision 7 release notes. Thanks for all your help and please excuse my english. Claudio n Sep 15, 2:04 am, Lance Nanek lna...@gmail.com wrote: You are missing the new resourcefile attribute on apkbuilder. Also, the value you are using for apkfilepath looks weird as well. Did you just copy it from what you were using for the old basename attribute? It probably won't break due to that, but if you want the same behavior as before you should append -debug.apk or -unsigned.apk to the value you are passing to the replacement attribute depending on if you are signing or not. On Sep 14, 10:32 am, Claudio Veas claudio.v...@gmail.com wrote: Hello Group, Im having a problem with my ant task that I use to compile my project. The build.xml that I was using with revision 6 of the SDK stopped working after the upgrade of the SDK tools to revision 7 and I havent been able to figure why this happen, all I know is that certain task attributes where deprecated and some warnings came up but when executig apkbuilder, a NulPointerException is thrown and I have not been able to see why. BTW, I already fixed the warnings of the deprecated tasks so that was not the problem. -package-debug-sign: [apkbuilder] Creating android-build and signing it with a debug key... BUILD FAILED ..\build.xml:349: The following error occurred while executing this line: ..\build.xml:206: java.lang.NullPointerException Line 349 is target name=-package-debug-sign depends=-dex, -package- resources package-helper sign.package=true / -- This one /target and Line 246 is macrodef name=package-helper attribute name=sign.package / element name=extra-jars optional=yes / sequential apkbuilder outfolder=${out.absolute.dir} apkfilepath=${ant.project.name} signed=@{sign.package} verbose=${verbose} -- This one dex path=${intermediate.dex.file}/ sourcefolder path=${source.absolute.dir} / nativefolder path=${native.libs.absolute.dir} / jarfolder path=${external.libs.absolute.dir} / /apkbuilder /sequential /macrodef I really hope you can help me. If you know why revision 7 of the sdk has this problems or at leas if you know how I can go back to revision 6 I would really apreciate ir. Thanks in advance Claudio Veas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Apkbuilder problems with new android SDK tools revision 7
unfortunately we don't have docs on this. the current usage of the task in the lastest rules is: apkbuilder outfolder=${out.absolute.dir} resourcefile=${resource.package.file.name} apkfilepath=@{output.filepath} debug=${build.debug} abifilter=${filter.abi} verbose=${verbose} hascode=${manifest.hasCode} dex path=${intermediate.dex.file}/ sourcefolder path=${source.absolute.dir}/ sourcefolder refid=android.libraries.src/ jarfolder path=${external.libs.absolute.dir} / jarfolder refid=android.libraries.libs / nativefolder path=${native.libs.absolute.dir} / nativefolder refid=android.libraries.libs / extra-jars/ /apkbuilder please note: resourcefile is the compiled resource file (generated with the .ap_ extension). This is file *name* *only*. *Must* be located in ${outfoler} apkfilepath is the destination file. This is the full path to the apk to generate. does not have to be in outfolder. basename is deprecated in tools r7 I think and will not be present in r8 (will trigger an error) apkbuilder should be pretty stable now, so hopefully if we do changes we can keep compatibility. Xav -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Apkbuilder problems with new android SDK tools revision 7
Thanks I will see the file that you request and as soon as I get the answer or have more doubts I will get back to you. Thanks again On Sep 14, 2:10 pm, Xavier Ducrohet x...@android.com wrote: To support library projects properly (with dependencies on library), we've had to change this custom task a bit (also did some clean up). I'd recommend looking at the usage of this task in the new ant rules files (SDK/tools/ant/ant_rules_r3.xml) to see what's missing. Xav On Tue, Sep 14, 2010 at 7:32 AM, Claudio Veas claudio.v...@gmail.com wrote: Hello Group, Im having a problem with my ant task that I use to compile my project. The build.xml that I was using with revision 6 of the SDK stopped working after the upgrade of the SDK tools to revision 7 and I havent been able to figure why this happen, all I know is that certain task attributes where deprecated and some warnings came up but when executig apkbuilder, a NulPointerException is thrown and I have not been able to see why. BTW, I already fixed the warnings of the deprecated tasks so that was not the problem. -package-debug-sign: [apkbuilder] Creating android-build and signing it with a debug key... BUILD FAILED ..\build.xml:349: The following error occurred while executing this line: ..\build.xml:206: java.lang.NullPointerException Line 349 is target name=-package-debug-sign depends=-dex, -package- resources package-helper sign.package=true / -- This one /target and Line 246 is macrodef name=package-helper attribute name=sign.package / element name=extra-jars optional=yes / sequential apkbuilder outfolder=${out.absolute.dir} apkfilepath=${ant.project.name} signed=@{sign.package} verbose=${verbose} -- This one dex path=${intermediate.dex.file}/ sourcefolder path=${source.absolute.dir} / nativefolder path=${native.libs.absolute.dir} / jarfolder path=${external.libs.absolute.dir} / /apkbuilder /sequential /macrodef I really hope you can help me. If you know why revision 7 of the sdk has this problems or at leas if you know how I can go back to revision 6 I would really apreciate ir. Thanks in advance Claudio Veas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Apkbuilder problems with new android SDK tools revision 7
I have the exact same problem. I'll check ant_rules_r3.xml for the fix tonight. On Sep 14, 1:10 pm, Xavier Ducrohet x...@android.com wrote: To support library projects properly (with dependencies on library), we've had to change this custom task a bit (also did some clean up). I'd recommend looking at the usage of this task in the new ant rules files (SDK/tools/ant/ant_rules_r3.xml) to see what's missing. Xav On Tue, Sep 14, 2010 at 7:32 AM, Claudio Veas claudio.v...@gmail.com wrote: Hello Group, Im having a problem with my ant task that I use to compile my project. The build.xml that I was using with revision 6 of the SDK stopped working after the upgrade of the SDK tools to revision 7 and I havent been able to figure why this happen, all I know is that certain task attributes where deprecated and some warnings came up but when executig apkbuilder, a NulPointerException is thrown and I have not been able to see why. BTW, I already fixed the warnings of the deprecated tasks so that was not the problem. -package-debug-sign: [apkbuilder] Creating android-build and signing it with a debug key... BUILD FAILED ..\build.xml:349: The following error occurred while executing this line: ..\build.xml:206: java.lang.NullPointerException Line 349 is target name=-package-debug-sign depends=-dex, -package- resources package-helper sign.package=true / -- This one /target and Line 246 is macrodef name=package-helper attribute name=sign.package / element name=extra-jars optional=yes / sequential apkbuilder outfolder=${out.absolute.dir} apkfilepath=${ant.project.name} signed=@{sign.package} verbose=${verbose} -- This one dex path=${intermediate.dex.file}/ sourcefolder path=${source.absolute.dir} / nativefolder path=${native.libs.absolute.dir} / jarfolder path=${external.libs.absolute.dir} / /apkbuilder /sequential /macrodef I really hope you can help me. If you know why revision 7 of the sdk has this problems or at leas if you know how I can go back to revision 6 I would really apreciate ir. Thanks in advance Claudio Veas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Apkbuilder problems with new android SDK tools revision 7
You are missing the new resourcefile attribute on apkbuilder. Also, the value you are using for apkfilepath looks weird as well. Did you just copy it from what you were using for the old basename attribute? It probably won't break due to that, but if you want the same behavior as before you should append -debug.apk or -unsigned.apk to the value you are passing to the replacement attribute depending on if you are signing or not. On Sep 14, 10:32 am, Claudio Veas claudio.v...@gmail.com wrote: Hello Group, Im having a problem with my ant task that I use to compile my project. The build.xml that I was using with revision 6 of the SDK stopped working after the upgrade of the SDK tools to revision 7 and I havent been able to figure why this happen, all I know is that certain task attributes where deprecated and some warnings came up but when executig apkbuilder, a NulPointerException is thrown and I have not been able to see why. BTW, I already fixed the warnings of the deprecated tasks so that was not the problem. -package-debug-sign: [apkbuilder] Creating android-build and signing it with a debug key... BUILD FAILED ..\build.xml:349: The following error occurred while executing this line: ..\build.xml:206: java.lang.NullPointerException Line 349 is target name=-package-debug-sign depends=-dex, -package- resources package-helper sign.package=true / -- This one /target and Line 246 is macrodef name=package-helper attribute name=sign.package / element name=extra-jars optional=yes / sequential apkbuilder outfolder=${out.absolute.dir} apkfilepath=${ant.project.name} signed=@{sign.package} verbose=${verbose} -- This one dex path=${intermediate.dex.file}/ sourcefolder path=${source.absolute.dir} / nativefolder path=${native.libs.absolute.dir} / jarfolder path=${external.libs.absolute.dir} / /apkbuilder /sequential /macrodef I really hope you can help me. If you know why revision 7 of the sdk has this problems or at leas if you know how I can go back to revision 6 I would really apreciate ir. Thanks in advance Claudio Veas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en