1. Check out our companion app, Forums for Android! Download from Google Play

No resource identifier found for attribute 'apikey' in package android

Discussion in 'Application Development' started by araujoivan, Oct 17, 2010.

  1. araujoivan

    araujoivan New Member
    Thread Starter
    5

    Oct 17, 2010
    2
    0
    5
    I' m developing a simply gogglemap app and i'm having the following error in main.xml -> "No resource identifier found for attribute 'apikey' in package android".

    I don't know what's wrong cause i've followed all steps of tutorial.
    My files:
    -----------------------------main.xml-----------------------------------
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:eek:rientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >


    <com.google.android.maps.MapView
    android:id="@+id/mapa"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:clickable="true"
    android:enabled="true"
    android:apikey="0z_TI6zsLHOcJElkUTJIvmgQ_DRInwlYjUgu7Cw"/>

    </LinearLayout>



    -----------------------AndroidManifest.xml-------------------------------

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.exemplo.mapas"
    android:versionCode="1"
    android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/app_name">
    <uses-library android:name="com.google.android.maps"/>

    <activity android:name=".Mapas"
    android:label="@string/app_name">
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    </activity>

    </application>

    <uses-permission
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:name="android.permission.INTERNET">
    </uses-permission>
    <uses-permission
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:name="android.permission.ACCESS_FINE_LOCATION">
    </uses-permission>
    <uses-sdk android:minSdkVersion="8"
    android:targetSdkVersion="8"
    android:maxSdkVersion="8" />

    </manifest>



    ----------------------------------Mapas.java--------------------------

    package com.android.exemplo.mapas;

    import com.google.android.maps.MapActivity;

    import android.os.Bundle;

    public class Mapas extends MapActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    }

    protected boolean isRouteDisplayed(){

    return false;
    }
    }

    -----------------------------------------------------------------------

    i'm using as Project build target the Android + Google API in -> Properties

    Somebody help me??????:(
     

    Advertisement

  2. ScreWAuger

    ScreWAuger New Member
    5

    Oct 27, 2012
    1
    0
    5
    just clean your project. i did the same and it solved my problem. it happens because some files get damaged while creation..
     
  3. jonbonazza

    jonbonazza Well-Known Member
    163

    Jul 13, 2010
    1,934
    458
    163
    Male
    Also, you need to make sure that your target SDK is "GoogleMaps APIs" for whatever SDK version you want. You can change this from the project properties in Eclipse.
     

Share This Page

Loading...