Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I want a command line tool that works in the following situation:
1) A computer with JDK and Android SDK installed (with the target Android platform).
2) An Android project created using eclipse.
And give me the following output:
1) The signed APK of the given eclipse Android project.
How do I accomplish the above by writing a Java program (By kicking off Ant using the Java Runtime class)? I want to automate the build process, how do I do that?
Thanks.
I've used ant to do this and we use Jenkins for Continuous Integration. I've written a post on how to automate this.
http://www.multunus.com/2011/09/continuous-delivery-for-android-apps-part-1/
I use Maven with the Android plugin. It works well.
See http://simpligility.github.io/android-maven-plugin/.
The Android build process is fairly complex: quite a few tools are invoked one after another: javac to compile, then dx to convert to dex, then aapt to package (I'm sure missing a few). You can run Ant in debug mode to see the exact sequence (it is also documented, somewhere...).
So you can either:
Bundle the Ant jars with your app and invoke Ant programatically
Write a Java 'script' that invokes the tools in the correct order
Write a simple shell script/batch file and be done with it.
I am currently using Fastlane to automate beta and production releases. Fastlane is largely written in Ruby and you can customize releases based on your internal processes. You can watch this Droidcon '16 video to get started.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
This post was edited and submitted for review 1 year ago and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
Some developers struggle with the complexity and performance of Gradle:
It can take a long time to build simple app.
It can takes a long time to build simple change in that app again.
It can be very difficult to debug build failures.
It is a large and complex system, with a steep learning curve.
It requires learning Groovy and a family of DSLs.
It is not easy to re-use build scripts across large projects.
So, is there an alternative to gradle for android application development?
Looking for a practical, easy to maintain build system which saves developers time.
I think every Android developer asked him/herself that question more than once.
However, Google puts all efforts into improving Gradle builds for Android. Since they are the inventors/owners of Android and a big big company too, I very much doubt, that there is any different building system that comes close to Gradle.
Additionally to Gradle and Google improving the build process with every new version of Gradle and/or Androidstudio, there are many ways to improve the building speed. Easiest one is to allow gradle to use more RAM.
But you can find a ton of information about that by searching the internet a bit.
You can build Android apps with maven or ant, from a shell. You'd have to create your own build scripts. A few years ago, when Google still supported the Eclipse plugin for Android, they used ant as the build tool.
However, it's my experience that gradle is not slower or faster than either maven or ant. There must be something else that slows your build process.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am having trouble in using git on android studio. I know there may be many related questions asked on this topic But I could not find any relevant answer.
I can use git normally but with android studio i am facing many problems. I am working on a project with my friend. The main project is on his repository. I have forked his repo. And cloned the project on my machine. Then using imported the project on my Android Studio. Till here things are fine but after this everything messes up when i try to use git.
Do i have to use git in the terminal inside android studio itself, or in normal terminal in file manager?
Can anyone give me a proper guide of how to collaborate on Android Studio using Git.
You can use git just as you wish... Git is a part of the project and hence does not depend on the Git client.
For example, I mostly use SourceTree as my main Git client.
But when I create a new repo, or push an existing project into a new repo, I prefer to use the command line.
Now when it comes to merging, I really appreciate the AndroidStudio merging tool, So I begin my merge with SourceTree and solve conflicts with Android Studio ^^
The best tool is the one you are comfortable with, however note that they are just front-end for the git (command-line) tool.
When you open a Git project in Android Studio, detects by the itself that your project is a Git project.
You will be able to see in the bottom of Android Studio something like this:
You can commit using Control + K
If you can't see it, maybe your git configuration/project is wrong.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
The Android SDK Tools Only package includes the official Android emulator and lots of other useful things.
The source code of these tools is not so hard to find. But I'm looking for the source code for the NSIS installer source code which installs these tools on Windows machines.
Please note: I'm not looking for the Android Studio installer source code. Instead, I'm looking for the SDK Tools Only installer source code.
Is it even available anywhere on the Web?
I mentioned my request in an issue in the Android issue tracker. From what David Herman at Google wrote in reply, it looks like it's not available online. He wrote:
I'm not sure what the plans for the SDK installer are moving forward - it may get deprecated by the current installer, especially as we roll more and more functionality of the SDK into Android Studio. At the very least, I'll look into it and see if porting it over to AOSP is trivial or not.
For now, take a look at the BUNDLE_SDK define in the Android Studio installer. That tiny subset is likely similar to what the standalone SDK installer is doing anyway. (Basically, have a skeleton SDK somewhere on your computer and package it using NSIS).
Note that there were a lot of bug fixes and polish changes that went into our current installer, and I think the SDK installer is a fork of the old installer well before any of those changes went in. You may find more success taking the current installer and cutting out all scripting code related to the DIR_SRC define (which points to the source directory for getting a clean copy of Android Studio). This may even be a valid approach we take, moving forward, to obsolete the existing SDK installer (e.g. add a new BUNDLE_STUDIO define)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
Since I've got issues with ndk development on eclipse (multiple errors when I open a .c file in the JNI so I cannot set any breakpoint without close and reopen the project after it) I was wondering if any of you has the knowledge of another IDE which would be more effective for an environment where I intent to use the NDK for calling a native library and the SDK for the rest (App gui, calls to lib, etc...)
Many thanks for your advices.
You can use Eclipse, NDK can be integrated there, there are some plug-ins that you can use to debug native code.
I'll recommend to use Android-Studio based on IntelliJ IDEA from jetBrains when there will be a v1 release, its UI is clear and effective and the debugger is less annoying than eclipse's one, however native development is a bit tricky unlike eclipse which provides the appropriated plugins when you write your module in C++ (if you do it in C, the compiler will take it as an error when you'll open your file in the IDE).
So I'll develop in native using eclipse until a native module exists for Android Studio.
How about keep using Eclipse on Linux with full features. Features for Java support and Native language support.
Did you try out Visual studio 2017+ ?
Remember, with Visual studio and C/C++, you can support windows, android, (may be IOs as well but not tried) from single code.
VS is light weight but powerful IDE.
I recommend VS2017.
at visualstudio.microsoft.com:
Write once target all
C++ is a great language for mobile app development
Migrate existing C++ libraries to target Android, iOS, and Windows platforms or use these C++ libraries to build complete Xamarin Android Native, Java Native Interface, >or iOS applications. You can also develop complete Android Native-Activity applications all within Visual Studio.
Article: Build an app for Android, iOS, and Windows (C++)
Article: Mobile Development with C++ | Windows UWP, Android and iOS
Video: Getting started with ndk and visual studio
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am developing an Android library for interacting with a web service, and I am trying to develop some unit tests to check how well this works.
When I run the specified tests, I get the following error:
[2012-07-19 15:12:09 - MMWebAPI] Could not find MMWebAPI.apk!
[2012-07-19 15:12:10 - MMWebAPITest] Test run failed: Unable to find instrumentation target package: com.webapi.mmwebapi
Where the MMWebAPI is the library, and does not produce a .apk.
I am looking for definitive guide for unit testing Android projects, specifically, what can and can not be tested (in this case, network operations are the core of the library), a step by step tutorial would be a great help also.
Android testing framework doesn't allow to test Android library without application project that depends on that library. Please look at this answer.
You can find good introduction to testing Android project here. If your code doesn't use android-specific method You can use JUnit for tests + some mocking library. Among other testing framework Robotium and Robolectric seems to be most popular.
What this answer mentions in an update is probably what's explained step-by-step here.
Ensure that your instrumentation tag is under manifest tag not application tag