When I create a shortcut, go to developer.android.com, the code I wrote below
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:enabled="true"
android:icon="@drawable/share"
android:shortcutId="search"
android:shortcutShortLabel="@string/recommend_us"
android:shortcutLongLabel="@string/recommend_to_friend"
android:shortcutDisabledMessage="@string/bind_unbound">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="com.example.myapplication"
android:targetClass="com.yidian.news.ui.search.SearchChannelActivity" />
</shortcut>
Plain. But when I create a project, I get an error here
Error: (2) Resource ID not found for attribute 'shortcutId' in package 'android'
Error: (2) Resource ID not found for attribute 'shortcutShortLabel' in package 'android'
Error: (2) Resource ID not found for attribute 'shortcutLongLabel' in package 'android' Error: (2) Resource ID not found for attribute 'shortcutDisabledMessage' in package 'android'
Why is this
update all Android SDKs and tools