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
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 7 years ago.
Improve this question
For a while I have been trying to include teseract in my android app on Android Studio (using this tutorial). Since it did not work after many trys (missing allheaders.h) I contacted the creators (blog Gautam Gupta and OCR Robert Theis)they told me to try it on eclipse. Since I am not very found of Eclipse (having various problems) I am wondering, if somebody used Android Studio to make an OCR with tess-two. If so can you maybe write a short instruction?
I am running Mac OS X, if it helps.
Eclipse can't compile its own Hello World Android App (already looked for solutions but didn't work for me), tess-two library shows no problems. I will try and update Eclipse but I still prefer Android Studio (already built a few projects there).
I think I found a good answer myself:
tesseract on Android 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
It would be awesome if somebody had a link to a list of Android source jars I could download, so I can attach the source code to Android in IntelliJ. I don't have time to be mucking around all day doing this (why reinvent the wheel?), I have apps to build!
I know Eclipse has a plugin that does this, but I don't like Eclipse, I'm using IntelliJ.
PS - I need Honeycomb+
Since there aren't full sources included for most versions of the SDK, you have a few options:
Grab the AOSP and build source jars yourself. Here is a blog post that talks about ways of accomplishing this.
Look for pre-built JARs that people have hosted. This is how the Eclipse plugin you mentioned works, and here is a link to another site that has the JARs up to 2.3.3; this is where I grabbed the JARs I have attached as sources in IntelliJ.
You may have noticed that you can download the sources JARs for 4.x directly from the SDK Manager now, so really 3.x is the only set missing pre-built JARs.
HTH
The best way to get the source code is by going to http://source.android.com/ and following the instructions on their site which will download an android.jar file and a lot of other components of the Android source code. The source code does take up a lot of space and using grepcode is a lot simpler.
you can find source code online and as a jar file here..
GrepCode: android - Java Project - Source Code
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.
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 am currently using Eclipse 3.5.0 for Android development. But I just wanted to try Android development in some IDE other than Eclipse.
Firstly, am I going on the right track or is Android development possible only on Eclipse? Secondly, if there are options other than eclipse, what are they and in what way are they better or worse than Eclipse? How to install Android SDK on them? A tutorial for working with that IDE with be really helpful.
Stone
Android development possible only on
Eclipse?
No it is possible in other IDE also
IntroAndroidDevNetBeans
IntelliJ IDEA 10
But the way I understood, Eclipse is the Best, because it's plugin and updates are directly given in the android developer sites itself, ADT
Personally I prefer the IntelliJ. I was a big fan of Eclipse but when I started using IntelliJ (with some learning curve), I just love it ! The community edition now offers support for Android SDK. However, unfortunately there is no support for building UIs ! So, my solution for now is to configure IntelliJ projects with Android libraries, use Eclipse as a UI builder tool and then use those XML files in INtellJ. I know its a painful process but that is how I get the best of both worlds !