gpt4 book ai didi

java - 构建失败,缺少关键属性(Android SDK)

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:46:20 25 4
gpt4 key购买 nike

我最近将我的项目从 Eclipse ADT 导入到 Android SDK。我正在尝试重新运行我的模拟器,但我的 AndroidManifest.xml 文件遇到问题,该文件指出:/Users/####/Documents/android/medicine/src/main/AndroidManifest.xml: 13:13-30 错误:在 AndroidManifest.xml:13:13-30 的元素 intent-filter 上缺少关键属性“action#name,category#name”之一

我在 Google 上搜索了错误,但没有找到任何可靠的信息。是否有此错误的原因,我假设是因为 Android 版本?在这方面的任何帮助都会很棒。

下面是我的 AndroidManifest.xml 文件:

 <?xml version="1.0" encoding="utf-8"?>
<manifest android:hardwareAccelerated="true" android:versionCode="20101" android:versionName="2.1.1" android:windowSoftInputMode="adjustPan" package="com.medicine" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="Med Finder">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/app_name" android:launchMode="singleTop" android:name="Medicine" android:theme="@android:style/Theme.Black.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:label="@string/app_name" android:name="org.pgsqlite.SQLitePlugin">
<intent-filter />
</activity>
<receiver android:exported="true" android:name="com.google.ads.conversiontracking.InstallReceiver">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
<intent-filter>
<action android:name="com.medicine.MESSAGE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id" />
<receiver
android:name="com.pushbots.google.gcm.GCMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<!-- Receives the actual messages. -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<!-- Receives the registration id. -->
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.medicinefinder" />
</intent-filter>
</receiver>
<receiver android:name="com.pushbots.push.DefaultPushHandler" />
<service android:name="com.pushbots.push.GCMIntentService" />
</application>
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- GCM connects to Google Services. -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<permission android:name="com.medicine.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.medicine.permission.C2D_MESSAGE" />
<!-- This app has permission to register and receive dataf message. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<activity android:name="com.mopub.mobileads.MoPubActivity" android:configChanges="keyboardHidden|orientation|screenSize"/>
<activity android:name="com.mopub.mobileads.MraidActivity" android:configChanges="keyboardHidden|orientation|screenSize"/>
<activity android:name="com.mopub.common.MoPubBrowser" android:configChanges="keyboardHidden|orientation|screenSize"/>
</manifest>

最佳答案

检查你的这些行:

<activity android:label="@string/app_name" android:name="org.pgsqlite.SQLitePlugin">
<intent-filter />
</activity>

在这里你定义了 Intent 过滤器而不是任何 Action 所以如果你不想在那里指定任何 Action 只需删除它或添加你想听的任何 Action ,

关于java - 构建失败,缺少关键属性(Android SDK),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33875940/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com