最佳答案
我遵循 https://developer.android.com/training/app-indexing/deep-linking.html上的指令,但是当我想通过 adb
触发意图时,用:
adb shell am start
-W -a android.intent.action.BROWSEABLE
-d "http://example.com/gizmos" com.myapp.android
我只是
错误: 活动未启动,无法解析意图{ Act = android.intent.action.VIEW dat = example://gizmos flg = 0x1000000 Pkg = com.myapp.android }
<activity
android:name=".activities.DeepLinkActivity"
android:label="@string/title_activity_deep_link">
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable" />
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="http"
android:host="example.com"
android:pathPrefix="/gizmos" />
</intent-filter>
</activity>
我犯了什么明显的错误吗?