ウィジェットのみのアプリケーションを作成しています。ウィジェットのみのアプリ:デフォルトのアクティビティが見つかりません
プロジェクトは古いSDKバージョンであり、正常でした。私は最新のAndroid Studioのバンドルをダウンロードしたとき
は今、それは私のappilcationを実行しないと、それは言う:
Error running app: Default Activity not found
しかし、私はどんな活動をしたくありません。私は単純なウィジェットを必要としています。
多くの人がこの質問をしましたが、私のことを信じています。私の質問に答えてくれた人はいません。
p.s:アクティビティを追加し、次のコードを使用してアクティビティをデフォルトにすると、正常に実行されますが、既定のアクティビティは必要ありません。何か方法はありますか?ここで
<activity
android:name=".MainActivity"
android:label="MyAppName" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
が私のマニフェストです:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.PerCalendar.perc"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<receiver android:name=".WidgetProvider" >
<intent-filter>
<!-- This widget provider receives broadcast with following action name or simply onUpdate of AppWidgetProvider is called -->
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<!-- linking up xml file of appwidget-provider to AppWidgetProvider -->
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_info" />
</receiver>
<service
android:name=".WidgetService"
android:permission="android.permission.BIND_REMOTEVIEWS" />
</application>
</manifest>
スタジオをアップグレードした後も同じ問題が発生します。先端に感謝します。あなたの答えは受け入れられたとフラグを立てるべきです。 – bdristan
ありがとう、それは働いた!これは回答としてマークする必要があります –