09 Wrz

Android: MapFragment nested in parent fragment

Would you like to show map in your smart Android app? It is very easy, but after successfully passed some steps. In this tutorial I would like to make these steps with you to make the process faster and in a specific case – we will show our map in nested fragment.

Before funny work with the Android code we need to go through basic checkpoint list:

  1. Check if you have installed a Google Play Services in your Android SDK Manager. If no of course please install it! Second part of this point is to import the google-play-services-lib project into your workspace.
  2. Find your debug.keystore (or other) to list some details about it (like SHA-1 hash which is extremly important to accomplish next step.
  3. Create Google Maps API Key basing on SHA-1 from 2nd step and your application package name.

Read More

20 Lut

Android with Eclipse: Conversion to Dalvik format failed with error 1 [solved]

During compiling some Android projects using Eclipse I had regular problems with exporting signed apk file. It is a known problem and everyone has his own solution to fix the issue. For my projects where I included many apk libs or jar files (Actionbarsherlock, gson, etc…) every export was finished with result:

Eclipse Android dalvik format failed with error

Conversion to Dalvik format failed with error 1

or my Eclipse crashed or the package was corrupted 🙂 It was very frustrating. It was not problem with Proguard. The solution is very simple. Before you start to create signed apk file you should:

  • go to Project menu -> disable Build Automatically…
  • after that Project -> Clean.. and clean all yours projects you use to create your apk ( uncheck Start a build immediately)

eclipse.clean_.android.without.recompile

  • and now right click on the project -> Android tools -> Export signed application package…

Works for me on my workstations with Windows. And you still have problems with that?