小编Mec*_*JDI的帖子

'找不到样式mapViewStyle'错误仍然存​​在

我刚刚决定在几天前休息时,我已经在这个应用程序上工作了近一年(高级项目).我的应用程序是使用我的Windows 7 64位PC使用Eclipse版3.7.2 64bit定位Froyo Android 2.2开发的.到目前为止,我尝试过:

  • 重新排列清单文件中的uses-library标记
  • 重写map xml文件
  • 删除R.java文件并刷新
  • 将mapview元素放在布局中
  • 重新安装eclipse和android-sdk
  • 清理项目
  • 创建style.xml文件并引用它
  • 在实际设备上部署
  • 恢复到以前的代码

可能更多......

我的代码如下:gmap.xml

<?xml version="1.0" encoding="utf-8"?>
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="0xMbgnc-el963gCdpl547hdkgXUILTskZr-T5uvg" // random key posted here
/>
Run Code Online (Sandbox Code Playgroud)

AndroidManifest.xml中

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.PubMe"
  android:versionCode="1"
  android:versionName="1.0">

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


<application android:icon="@drawable/icon" android:label="@string/app_name">
    <uses-library android:name="com.google.android.maps" />
    <activity android:name=".PubMeActivity"
              android:label="@string/app_name"
              android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".MappingActivity"
              android:label="@string/app_name">
    </activity>

</application>
</manifest>
Run Code Online (Sandbox Code Playgroud)

我非常感谢任何提前帮助.

java eclipse android google-maps android-xml

24
推荐指数
1
解决办法
1725
查看次数

标签 统计

android ×1

android-xml ×1

eclipse ×1

google-maps ×1

java ×1