main.xml中有谷歌地图错误 [英] main.XML have error for Google Maps

查看:151
本文介绍了main.xml中有谷歌地图错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的XML文件:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <com.google.android.maps.MapView
          android:id="@+id/mvMain"
                 android:layout_width="fill_parent"
                 android:layout_height="fill_parent"
                 android:clickable="true"
                 android:apiKey="MAP API KEY" />
</RelativeLayout>

和蚂蚁在编辑器中显示问题是在这里:机器人:layout_height =FILL_PARENT的> ,但事实并非如此。
这是明显的:

and in Ant Editor is showing that the problem is here: android:layout_height="fill_parent" > but it isn't. And this is Manifest:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.natasamisic.maptest"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="15" />
    <uses-permission android:name="android.permission.INTERNET"/>

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
         android:theme="@android:style/Theme.NoTitleBar">
        <uses-library android:name="com.google.android.maps" />
        <activity
            android:name=".Main"
            android:label="@string/title_activity_main" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

我试图清理一个项目,但仍无法正常工作。当我尝试运行它,它显示了这个控制台:错误在一个XML文件:中止建设

I tried to clean a project and still won't work. When I try to run it, it shows this in console:Error in an XML file: aborting build.

和显示新的空白XML文件中的 main.out.xml ...

and displays new blank XML file main.out.xml...

我应该怎么办?
我Main.java是确定的。问题是东西在XML中,也许有些Eclipse的错误,我不知道如何解决它。请帮助...

What should I do? My Main.java is ok. Problem is something in XML, maybe some Eclipse bug, I don't know how to solve it. Please help...

推荐答案

删除 main.out.xml 并清理项目形式菜单 - &GT;项目 - &GT;清洁

然后单击鼠标右键的项目 - &GT;运行方式 - &GT; Android应用程序

这篇关于main.xml中有谷歌地图错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆