我几天前更新了我的Android应用程序(新功能)。
使用真实设备进行调试时,应用程序正常启动,但是当我使用导出向导导出时,安装后无法点击[打开]按钮。
根据以下问题,我检查了我的清单文件,但似乎没问题:
why "Open" button after installing apk on android device is disabled?
intent-filter in manifest file to enable the open button on install
这是我的清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="xxxxxx"
android:versionCode="15"
android:versionName="2.0.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<!-- 課金パーミッション -->
<permission
android:name="jp.xxxxx.permissions.xxxx"
android:description="@string/billing_permission_title"
android:label="@string/billing_permission_group_title"
android:permissionGroup="android.permission-group.COST_MONEY"
android:protectionLevel="dangerous" />
<!-- ADVS パーミッション -->
<permission
android:name="jp.xxxxx.permissions.xxxxx_ADVS"
android:description="@string/advs_permission_title"
android:label="@string/advs_permission_group_title" />
<uses-permission android:name="jp.xxxxx.permissions.xxxxx_BILLING" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!-- Cosmics -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!-- 通知関係 -->
<permission
android:name="jp.xxxxx.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="jp.xxxxx.permission.C2D_MESSAGE" />
<!-- App receives GCM messages. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<application
android:allowBackup="false"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat.Light"
android:vmSafeMode="true" >
<!-- ■□■□■□ ACTIVITIES ■□■□■□ -->
<!-- splash -->
<activity
android:name=".activities.SplashActivity"
android:configChanges="orientation|keyboardHidden"
android:label="@string/title_activity_splash"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
<data android:scheme="cosmic4test" />
<data android:host="test.android.sdk.cosmic4.com" />
</intent-filter>
</activity>
<!-- top activity -->
<activity
android:name=".activities.MainActivity"
android:configChanges="orientation|keyboardHidden"
android:label="@string/title_activity_main"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateAlwaysHidden|adjustPan" >
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable" />
</activity>
<!-- ranking -->
<activity
android:name=".activities.RankingFragmentActivity"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait" >
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable" />
</activity>
<!-- 検索機能 -->
<activity
android:name=".activities.SearchActivity"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden" >
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
</activity>
<!-- LOGIN ACTIVITY -->
<activity
android:name=".activities.LoginActivity"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="jp.xxxxx.app.LOGIN_ACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- Browserからのアクセス -->
<activity
android:name=".activities.fromBrowserActivity"
android:configChanges="orientation|keyboardHidden"
android:label="@string/action_redirect" >
<intent-filter>
<data android:scheme="xxxxxappli" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
...
<other activity without intent-filter>
...
<!-- ■□■□■□ SERVICES ■□■□■□ -->
<!-- 課金サービス(remote) -->
<service
android:name=".service.xxxxxInBillService"
android:enabled="true"
android:exported="true"
android:permission="jp.xxxxx.permissions.xxxxx_BILLING"
android:process=":remote" >
<intent-filter>
<action android:name=".service.xxxxxInBillInterface.aidl" />
</intent-filter>
</service>
<!-- キーワード+カテゴリ情報 -->
<service android:name=".service.KeywordsAndCategoriesService" />
<!-- ブロードキャストをハンドリングするサービスを登録 -->
<service
android:name=".service.GcmIntentService"
android:enabled="true" />
<service
android:name=".service.xxxxxADVSService"
android:enabled="true"
android:exported="true"
android:permission="jp.xxxxx.permissions.xxxxx_ADVS"
android:process=":remote" >
<intent-filter>
<action android:name=".service.xxxxxADVSInterface.aidl" />
</intent-filter>
</service>
<!-- ■□■□■□ RECEIVERS ■□■□■□ -->
<!-- 端末起動時、アプリ更新をチェック -->
<receiver android:name=".broadcast.NotificationBroadcast" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<!-- -->
<receiver android:name=".broadcast.AlarmUpdate" />
<!-- ブロードキャストレシーバー「GCMBroadcastReceiver」を登録 -->
<receiver
android:name=".broadcast.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<action android:name="com.google.android.c2dm.intent.GCM_RECEIVED_ACTION" />
<category android:name="jp.xxxxx.service" />
</intent-filter>
</receiver>
<!-- cosmics -->
<receiver
android:name="com.cosmic4.sdk.android.CM4BroadcastReceiver"
android:exported="true" >
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<!-- ■□■□■□ META ■□■□■□ -->
<meta-data
android:name="com.crashlytics.ApiKey"
android:value="xxxxxxxxxxx" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
</manifest>
(我已经删除了没有意图过滤器的活动)
我正在使用其他2个项目作为图书馆:
谢谢
答案 0 :(得分:2)
我在将[android:scheme] + [android:host]从SplashActivity移动到MainActivity时解决了这个问题。 谢谢
答案 1 :(得分:1)
<activity
android:name=".activities.SplashActivity"
android:configChanges="orientation|keyboardHidden"
android:label="@string/title_activity_splash"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="cosmic4test" />
<data android:host="test.android.sdk.cosmic4.com" />
</intent-filter>
</activity>