I am working alongside with two other developers in an android application. In the application we use other third-party libraries like SlidingMenu.
In eclipse we should include the SlidingMenu project and point our application to use this project as library.
Now I want to automate the building of the application using Hudson(Jenkins) but I have no Idea how I will deal with the dependence libraries like SlidingMenu.
Any Ideas
So long as you can build your app on the command line (e.g. using the Ant or Gradle build systems for Android), then you can build your app in Jenkins.
For the Ant build system, all you need to do is place your dependency JARs in the "libs" directory.
Or if you're using library projects, the Eclipse plugin should have already added the required entries to your project.properties file.
Related
We have the following setup:
We build and ship an Library for our clients. The SDK is obfuscated with DexGuard
That Library is also used in our application. Our application should use the same AAR file that is shipped also to the clients that is obfuscated.
Till version 2.3.* of Android plugin it was building the AAR file and reusing then that library for the app. From version 3.0 it does not seems to be the case. I have the feeling that it is using directly the files.
Is there a way to force the same process - to build the AAR and then to use it from the app?
Thanks and Kind Regards
I am currently using Android Stuio Beta 0.8.1 an its working fine but I am having an issue with library projects are handled.
In Eclipse, I create an Android project which is my app project and another project which is my Library project. From my App project, I reference my Library Project and I can modify the library project and the changes are automatically built into the app project.
I am trying to do the same thing with Android studio but am having a problem.
The problem is I create my Library project in Android Studio and my App Project in Android Studio.
From my app project I go File > Import Module and point to my library project and it then copies all of the source code from my library project into my apps project structure.
From my app project I then project structure and select module dependency of the module I have just imported.
The problem is though, as it copies all of the source from my library project into my app project, if I modify the code that's imported into the app project structure, then the library project isn't updated, and if I update the library project code, the app referencing the library doesn't see the change.
My library is being referenced by multiple projects, and at the moment if I change, librar projects, the apps continue to use the old code, so I am having to copy/paste the source code into the apps project stucture and re-build.
Am I missing something basic or is it just Android Studio isn't really working too well witih libraries so copy/paste is my only option for the time being.
Because libraries must live within the main project, it's difficult to share them across projects. If that's your usage, the library should be its own project that you publish to maven locally. After that, you can declare it as a dependency similar to any other. Keep in mind that the version number of the library becomes important; when you make changes to the library, be sure to publish with a new version number.
I have a main Android project which references 4 other Android-Library projects in gradle. It compiles just fine and i can deploy it via gradle commandline, however I would like to debug my code using eclipse.
Whenever I load up the projects in Eclipse using the gradle integration plugin for Eclipse, eclipse won't even recognize them as library projects and instead treats them like normal android applications. Is this behavior normal or is something wrong with my gradle build script or does eclipse simply not support such a setup yet? Running/debugging the main application in eclipse just installs the individual libraries as regular applications which results in my main application not being able to find the specified classes.
My gradle build script is basically a c&p from Mike Gouline's sample project https://github.com/mgouline/android-samples with "apply: android" replaced with "apply: android-library" for my library projects.
Eclipse doesn't properly support Android Gradle projects. The Android plugin has a lot of specialized support for android-library modules that Eclipse's Gradle integration doesn't know about. For the time being, if you want full IDE support for Android/Gradle, Android Studio or IntelliJ with the Android plugin are your only choices.
We know the situation for people who are using the Gradle build system and want to use Eclipse isn't great; it's something we're thinking about, but we don't have anything definite on the roadmap yet.
I have a Android project that is currently built and deployed to a internal website by a Hudson build server. Recently we added the android-support-v7-appcompat library as a dependency (library project).
My question is, how do I include the android-support-v7-appcompat resources and library into my build script? Do I copy the actual files into my project with the build script (don't even know if the app will then still recognize the library) or will this automatically happen when the build file (to build the apk) is executed?
In the end the only thing I had to do was generate a build file for the appcompat library. After that the build was successful.
How can I create an Android library project in NetBeans IDE? The build target would be a JAR for use in another Android project. I've seen the documentation at http://developer.android.com/guide/developing/projects/projects-eclipse.html for creating a library project in Eclipse, but I'm using NetBeans. I do not see an isLibrary property available in the properties for the Android project. If there is not a built-in way to accomplish this, how might I go about manually setting up an Android library project? Forgive me if this is a thick question.
Netbeans is using the standard android project layout (see the features site) and the standard ant-based build. This means that there is a project.properties file in the project's root. A library project has android.library=true in it, along with the android target version (and eventually other android library references). This file can be viewed and opened under Important Files. When cleaning and rebuilding, Netbeans behaves as if this is a lib project (does not create apk etc.)
Otherwise, you could use the SDK android tool (located in $SDK/tools) to generate the lib project on the cmdline and then try to import it into Netbeans somehow.