3

I am trying to build the OSMAnd for Android via Eclipse and Android Studio via this official build instructions at: https://code.google.com/p/osmand/wiki/GradleCommandLineBuildEnvironment

I am getting following error message: http://appsforfree.org/apk/android-studio-osmand-build-error-message.png

It is in regards to net.osmand:OsmAndCore_android:0.1-SNAPSHOT classes not available.

Can anyone point how to fix this?

Official URL does not provide anyone to ask for help either.

user914425
  • 16,303
  • 4
  • 30
  • 41

1 Answers1

2

I success to build OsmAnd in android studio. You can follow this step to check out OsmAnd on Github:

  1. In Android Studio's "Welcome to Android Studio" page, select "Check out project from Version Control" .
  2. In "Clone Repository" page, clone from github's OsmAnd : https://github.com/osmandapp/Osmand
  3. In "Import Project from Gradle" page, select "Use default gradle wrapper (recommended) "
  4. After import project, in "Project Window" should have 11 projects clone from github.
  5. Download OsmAnd-resources, and rename directory to "resources", place with OsmAnd Project directory.
  6. Open Build Variant window: Build->Select Builder Variant
  7. Set OsmAnd module's Build Variant with x86 or Fat. (Fat means include all cpu's library)
  8. Run and execute on Genymotion. (or your android mobile phone)

I share the process on my blogger. It's write down by chinese, but you can understand what I done by pictures also.

Good Luck!

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – MarsAtomic Sep 30 '15 at 00:08
  • As MarsAtomic suggestion, I list step what I did in androidstudio for reference. – skyforce Shen Sep 30 '15 at 03:08
  • @skyforceShen can you also post instructions for eclipse too? – user914425 Oct 01 '15 at 16:56
  • I had try to import OsmAnd in eclipse, but failed. Maybe due to I'm unfamiliar with eclipse.... – skyforce Shen Oct 02 '15 at 17:09
  • For beaumont_k: I don't have enough reputation to comment with you. So I comment here to response you. I use JDK 1.7 only, I had try JDK 1.8 , but building is failed. Android SDK maybe not support JDK 1.8 . – skyforce Shen Oct 02 '15 at 17:13
  • beaumont_k: you can resolve .png and string problem follow step 5, cause by lack of OsmAnd-resources(or put in wrong place) . After resource ready, sync gradle and build. If you still have gradle problem, maybe you don't have right gradle version. Try re-open android studio and sync gradle again. – skyforce Shen Oct 05 '15 at 03:30