Android - Build application without eclipse - android

I have one main application and an Android library project that it
uses
I can compile and run the application fine in eclipse
when I try to build the same app using ant I am facing issues
I am not able to get the same result with aapt that eclipse does(in
the background)
eclipse plugin seem to merge the resources together (layouts, icons,
strings, etc) for both the main app and the library project.
Anyone knows how to do this in command line in aapt
Thanks

Check the documentation: http://developer.android.com/tools/building/building-cmdline.html
It has everything about building without Eclipse.

You can compile your applicaiton without eclipse using this way. Its a perfect idea. Also refer this blog.

Related

how to make an android APK from android files without using AndroidStudio?

I have those three files:
activity_main.xml
MainActivity.java
AndroidManifest.xml
Those belong to a webview app I found on google...
I want to convert those files into an android apk....
I have no ides at all, just my basic laptop (doesnt support android studio) with internet conection. How can I make that work?
First you need to install Google's Android Studio. Go to
https://developer.android.com/studio
and then follow the installation instructions. Do not be surprised if this takes some time! Android Studio is BIG when you have installed the necessary SDKs and perhaps an emulator. Android Studio includes a lot of useful help.
From command line is posible with
gradlew assembleDebug
https://developer.android.com/studio/build/building-cmdline

How to Determine Build Process for Inherited Android App

I have inherited an unfinished Android App project from a client. There is a lot of work to be done fixing it up, but I cannot even figure out how to build the project! There is no build.xml file, so I don't think they used ANT to build. How can I find out how to build this existing project?
There is a working APK in the project, so it had to have been built successfully at some point.
Thanks for the input guys. I am used to doing everything via command line because I'm not a huge fan of Eclipse. Turns out that the original developers of this app were actually using a different IDE called IntelliJ. I have not gotten the app to compile yet but I am now on the right track.

Testing my android library without compile

I would like to test my library in an android application, but I would like to avoid compiling and moving around .jar files.
In Xcode for iOs development, it's possible to add your library project in your workspace inside your other project (a test app) and when you run your test app, it builds the library and links everything up correctly.
Can I do this for Android development in Eclipse? How can I do this?
I tried to add a library but it seemed very manual which isn't ideal on time.
The important thing here is that I do have Android references and dependancies, so i can't just unit test the library by itself. I am also creating an SQLite database which I would like to inspect during development.
I guess you are asking about Android Library projects, otherwise you can just test your library using JUnit.
In such case, the post android: testing library projects gives you a step by step guide on how to proceed to test the Android Library project in a stand-alone fashion. Think it can also be tested through the tests belonging to the Android project that uses the library.
You can test your library code using RoboElectric that allows you to test without the need of deploying an android emulator.
Or you can set your library project as an Android library project and put the test in the first project. link
In latest android SDK tools you do not need to add jar in build path, they will be added automatically.
you can put you jar file in libs folder of your project, But it will defiantly be compile before running.

Running Android project through Eclipse

I have a problem running my android project through eclipse. It gives following error when I try to run it:
trouble processing "javax/net/SocketFactory.class": ... Conversion to
Dalvik format failed with error 1
I am using Android 2.3.1 API level 9. The android.jar that is downloaded from AVD Manager has the javax/net package inside it.
I have searched on this issue and it seems to be the issue related to conversion of classes into Dalvik. But "javax/net/SocketFactory.class" is part of the android.jar. Any suggestions ?
The problem is resolved. I was mistakenly adding two android libraries at a time. One is added by default and other is added via Maven dependency. Removing the android dependency from pom.xml works. But now it is not working on terminal through mvn install command. This is a separate issue now.
As you know android sdk comes complete with java sdk build in. This sdk is light weight and customized for use by the dalvik engine. Now, if we also add java jar’s along with the android app, obviously the android system will have trouble converting that java jar to dalvik. Hence the “conversion to dalvik” issue.
So now that you know what happens, lets figure out why it happens.
In my case it was the barcode, zxing framework that caused the problem. You have to find out what is causing the issue in your setup.

Why wouldn't Android applications compile from source?

I am trying to compile the default projects that come with Android; however, it doesn't seem to be working at all. Most of the classes and libs seem to be missing.
Did you move your SDK after creating the project? If you did, this breaks the build scripts.
On a secondary note- Google recommends using Eclipse IDE (
http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/heliossr1
) for Android Development. Textmate is great, but Eclipse will make your life a lot easier for Android development.
I know this is an old question, but I'm curious. Did you ever try running
android update project --path .
in the project's directory? I have needed to use that command in the past.

Categories

Resources