Null Pointer exception in using support library share action provider

后端 未结 3 891
时光取名叫无心
时光取名叫无心 2021-01-04 06:06

Below is the code of my Activity . In this I am using the support library appcompat

   import android.content.Intent;
   import android.os.Bundle;
   import          


        
3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-04 06:37

    I found the error. The problem was that support library requires to have a custom prefix and not android:actionProviderClass . What i was doing wrong that i used android:actionProviderClass instead of customprefix:actionProviderClass

    See here: https://developer.android.com/training/basics/actionbar/adding-buttons.html

提交回复
热议问题