java.lang.NoSuchMethodError: android.app.Notification$Builder.addAction

前端 未结 1 655
盖世英雄少女心
盖世英雄少女心 2020-12-19 08:48

I have developed an android application where i have used notification to be displayed when the application starts

The application works perfect when i run the code

相关标签:
1条回答
  • 2020-12-19 08:54

    addAction() was added to API Level 16; Android 4.0.4 runs API Level 15. Either switch to NotificationCompat.Builder from the Android Support package, or only call addAction() if Build.VERSION.SDK_INT>=Build.VERSION_CODES.JELLY_BEAN.

    0 讨论(0)
提交回复
热议问题