Skip to content

Setting up GindPubs

Francisco Contreras edited this page Nov 9, 2013 · 9 revisions

1. Get the repository from GitHub.

Go to https://github.com/fcontreras/gindpubs-frameworks and click on "Download ZIP" or clone the repository by downloading a windows GIT client from http://windows.github.com/ and follow the instructions.

If you are using linux, clone the repository with the following command:

git clone https://github.com/fcontreras/gindpubs-frameworks.git

2. Download and install Android Studio.

You can get the Android Studio package from http://developer.android.com/sdk/installing/studio.html. It includes all what is needed to open and create new Android projects and it is based on IntelliJ IDEA.

With Android Studio you will be able to build the project using Gradle, which adds ease of project and dependencies management.

3. Open the Gindpubs project.

Android Studio does not require your project to be in a specific location in order to recognize it and open it as an android project. You can have the files in any place of your hard drive where you first cloned the GitHub repository.

  • Open Android Studio, the first time it will present a wizard to start working on it, you can select Open project from there. If not, goto File > Open Project...
  • Select the root directory of the project.

4. Configure development environment.

To start running and using the Gindpubs frameworks, you first need to install:

  • A supported Android API.
  • Android SDK tools.
  • Google Extra libraries.

Open the SDK Manager from Android Studio clicking the button:

SDK Manager

Then check to install the API 17 (4.2.2) which is the target SDK for Gindpubs, you are free to test it later or latest APIs.

Install API

Now, under the Tools node, select Android SDK Tools, Android SDK Platform-tools and the newest version of the Android SDK Build-tools.

Install API

On the same SDK Manager, scroll all the way down to Extras, and select Android Support Library, Google Repository and Google USB Driver (if using windows).

Install Extras

After that install the packages by clicking Install X packages

5. Running the project with Android Studio.

All the project's configuration resides in Gindpubs > src > res > values > strings.xml

In this file you can modify the project's UI, URL where to pull the shelf and others.

After you have configured the project to your needs, simply plug in your device or create an Android Virtual Device (read http://developer.android.com/tools/devices/managing-avds.html) and select Run > Run or use Shift+F10.

NOTE If you cannot run the project due to missing build/run configurations like the following:

Missing Run configuration

Just go to Run > Edit Configurations and create a new one by selecting Android Application, type a name and select the default Gindpubs module.

Missing Run configuration

IMPORTANT If when trying to run the project, an error like the following occurs:

Missing SDK

Just click OK, and then select a proper SDK that you have previously installed. Like in this image:

Install Extras

Troubleshooting Android Studio post installation.

E1. Missing DLL: MSVCR100.dll

Solution:

E2. Failed to load JVM DLL, I you have a 32-bit JDK installed on a 64-bit OS and 64-bit Android Studio, define the JAVA_HOME variable.

Solution:

  • Install the 64-bit version of the JDK

E3. Won't detect automatically my device when running the application.

Solution: Go to Run > Edit Configurations Then on "Target Device" section, select "Show chooser dialog".

E4. Can not run the project after installing all the required tools and libraries.

The error:

Uploading file
    local path: /<my local path>/gindpubs-frameworks/GindpubsProject/Gindpubs/build/apk/Gindpubs-debug-unaligned.apk
    remote path: /data/local/tmp/com.giniem.gindpubs
Local path doesn't exist.

Solution: Clean and build the project again

  • Click on menu Build > Clean Project.
  • Click on menu Build > Rebuild Project.