Wednesday, 10 September 2014

Google-play-services_lib Unable to resolve target 'android-9

Problem :
   When trying to import   Google-play-services_lib to eclipse get the following error.
 
                     Google-play-services_lib Unable to resolve target 'android-9
Solution:
     Open the SDK Manager, click obsolete (so API 9 shows up), and grab API 9.I. Install API 9 packages.

Monday, 8 September 2014

Unexpected namespace prefix "xmlns" found for tag fragment

Problem:
     <fragment xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/map"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/spr_place_type"
        class="com.google.android.gms.maps.SupportMapFragment" />   

Solution:

Remove xmlns:android="http://schemas.android.com/apk/res/android" from the <fragment> element, and consider moving xmlns:map="http://schemas.android.com/apk/res-auto" from the <fragment> element to the root element.
For example, this is valid:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:map="http://schemas.android.com/apk/res-auto"
    android:id="@+id/foo"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <fragment
        android:id="@+id/map"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        class="com.google.android.gms.maps.SupportMapFragment"
        map:mapType="satellite"/>

</RelativeLayout>