I've been having issues importing the balanced-api for Android into eclipse. I cloned the project from their git repo: https://github.com/balanced/balanced-android
However every time I attempt to import the project I receive the following error:
"Cannot nest 'balanced-android/src/main/java' inside 'balanced-android/src'. To enable the nesting exclude 'main/' from 'balanced-android/src'
I'm also not to sure what this error really means, so perhaps if someone could explain it that might prove helpful.
Screenshot:
I have tried on several occasions with no success. Of course I have also tried restarting eclipse, recloning the project but still with no success.
Thanks
Since ADT functions differently and Android development environments and project structures vary, I can provide you with some tips on how I've imported balanced-android into an application using ADT, however, your mileage may vary.
If you encounter dex errors, yo'll have to work with your dependencies to resolve the issue.
My example project is also a maven project. If yours is not and you want to convert it to one, right click the project and select Maven -> Convert to maven project. You can then open pom.xml and add the following to satisfy dependencies:
<dependencies>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
If your project uses maven, you'll probably want your Java Build Path -> Default output folder to be /bin/classes
. I ran into Android errors when this was set to /target/...
Ref: https://docs.balancedpayments.com/1.1/guides/mobile/#balanced-android