【发布时间】:2017-08-16 09:01:27
【问题描述】:
我有两门课:
1) 公共类 ClassA 扩展 ClassB
2) 公共抽象类 ClassB 扩展 AppCompatActivity...
对于这两个类,我使用下面的代码。 ClassA 有效(我得到一个 logcat,onCreate 被击中),但 ClassB 没有。它返回“未安装应用程序”,这让我觉得我的 targetPackage 是错误的,但是 ClassA 有效,所以我很困惑。是因为classB是抽象的吗?
<shortcut
android:shortcutId="..."
android:enabled="true"
android:icon="..."
android:shortcutShortLabel="..."
android:shortcutLongLabel="..."
android:shortcutDisabledMessage="...">
<intent
android:action="..."
android:targetPackage="this.is.example.X" // where X is product flavor
android:targetClass="this.is.example.ClassA" />
<categories android:name="..." />
</shortcut>
【问题讨论】:
标签: android