• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

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

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:orientation="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??????:(
 
just clean your project. i did the same and it solved my problem. it happens because some files get damaged while creation..
 
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.
 
Back
Top Bottom