dhis2 / dhis2-android-dashboard

:no_entry: [DEPRECATED] Android application for DHIS2 which implements basic dashboard functionality.
BSD 3-Clause "New" or "Revised" License
17 stars 47 forks source link

Import error #16

Closed rishabh7m closed 8 years ago

rishabh7m commented 8 years ago

While importing in android studio got the following error. Error:Configuration with name 'default' not found.

Steps:-

  1. Import project.
  2. Selected dhis2-android-dashboard directory
erlingfjelstad commented 8 years ago

Hi, Make sure that your SDK project is in 2.22-legacy branch and try building again. Let me know if it works.

rishabh7m commented 8 years ago

Hi @erlingfjelstad , can you please elaborate this? I was searching for the same and came to know that there is dhis2-android-sdk. So, should I use this sdk instead of android Sdk?

erlingfjelstad commented 8 years ago

Try to switch to legacy branch in dashboards project and check if it builds. Sorry, we're partially in a refactoring stage right now

rishabh7m commented 8 years ago

Still the same error.

erlingfjelstad commented 8 years ago

Did you sync gradle?

arazabishov commented 8 years ago

Hi rishabh7m,

Here are several steps you should consider: 1) Make sure you are on legacy branch 2) If you first imported project from master branch and then switched to legacy, try to invalidate cache and restart android studio.

rishabh7m commented 8 years ago

Now I am getting different error: - gradle dsl method not found 'compile()'

arazabishov commented 8 years ago

While importing the project to android studio, did you select to use "gradle wrapper" or global gradle installation for builds?

rishabh7m commented 8 years ago

Global. Gradle wrapper was not showing any files while selecting gradle home

arazabishov commented 8 years ago

You should select gradle wrapper option and leave gradle home property blank. Also make sure that when you import project, android studio is pointed to app/build.gradle.

rishabh7m commented 8 years ago

Android studio is not allowing to keep gradle home path empty.

Dvik commented 8 years ago

i've pointed to app/build.gradle while importing the project and had selected the gradle wrapper option. However, i get the error that sdk location is not defined but in local.properties i have this : sdk.dir=C:\Users\Divya\AppData\Local\Android\sdk.

Dvik commented 8 years ago

Built successfully. Had just pointed to the wrong build.gradle earlier.

mayank-kgp commented 8 years ago

@ArazAbishov Hi... Which server url,username and password to use for entering in the app?

Dvik commented 8 years ago

You can try to use it with demo server: https://play.dhis2.org/demo Username: admin Password: district

mayank-kgp commented 8 years ago

@Dvik Thanks