Since version 3.1, DroidUX libraries are available as Android AAR packages. We recommend that you use the AAR format, whenever possible, if you’re using DroidUX components in your app project.

Alternatively, if for some reasons you can’t use AAR packages locally to develop your app, you can use DroidUX .JAR file in combination with its companion library project.

To use DroidUX JAR and library project in your app, just follow these instructions:

1. Create new application project (or open existing one).

new_project

2. Add required JAR files into the project.

add_jar_libs

Put the DroidUX Core v3 (required) JAR file, and all DroidUX packages containing the widgets you’re planning to use in your app, under the app’s libs/ folder. Make sure that the app’s build.gradle configuration include the dependencies to libs/ folder, android-support-v4 and appcompat-v7 libraries.

3. For each DroidUX package included in your app project, you need to import the accompanying library project into your app project.

Go to ”File > Import Module …” and browse to the folder(s) where you’ve put the package’s library project, and select to import them into your app project.

import_libproj

Make sure that the imported library projects are added into the settings.gradle file, and the IDE has been synchronized with the gradle settings.

gradle_settings_libproj

4. Update the app’s build.gradle to include the DroidUX library projects as dependencies.

app_gradle_libproj

Update the app’s build.gradle file to include the necessary DroidUX library projects as dependencies of the app module (1). Then, (2) sync gradle with the IDE.

5. Register the DroidUX libraries in your custom Application class.

Note: For DroidUX v3 libraries, you only need to register once for all the packages included in your app project.

And set the custom Application class in the app’s manifest.

update_manifest_jar

6. You are now set to go and build your super awesome app using DroidUX .JAR + library project.

Happy coding 😉

Pin It on Pinterest

Shares
Share This