Android 无法实例化receiver com.example.smsmining.GcmBroadcastReceiver:java.lang.ClassNotFoundException:

Android 无法实例化receiver com.example.smsmining.GcmBroadcastReceiver:java.lang.ClassNotFoundException:,android,unity3d,onesignal,Android,Unity3d,Onesignal,我在统一中实现一个信号。当我从应用程序中的oneSignal发送通知时,应用程序崩溃并给出标题中的错误。我也尝试了.GcmBroadcastReceiver,但给出了相同的错误。这是我的文件 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schem

我在统一中实现一个信号。当我从应用程序中的oneSignal发送通知时,应用程序崩溃并给出标题中的错误。我也尝试了.GcmBroadcastReceiver,但给出了相同的错误。这是我的文件

<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
          xmlns:tools="http://schemas.android.com/tools" 
          package="com.deadmosquitogames.androidgoodiesdemo.assetstore"
          android:versionName="1.0" android:versionCode="1" android:installLocation="preferExternal">
    <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true"
                      android:xlargeScreens="true" android:anyDensity="true"/>
    <uses-feature android:glEsVersion="0x00020000"/>
    <supports-gl-texture android:name="GL_OES_compressed_ETC1_RGB8_texture"/>
    <application android:usesCleartextTraffic="true" android:theme="@style/UnityThemeSelector" android:icon="@drawable/app_icon"
                 android:label="@string/app_name" android:debuggable="true" android:isGame="true">
        <activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name"
                  android:screenOrientation="fullSensor" android:launchMode="singleTask"
                  android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
                <category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
            </intent-filter>
            <meta-data android:name="unityplayer.UnityActivity" android:value="true"/>
        </activity>


      <receiver android:name="com.example.smsmining.SMSBroadcastReceiver">
        <intent-filter>
          <action android:name="android.provider.Telephony.SMS_RECEIVED"/>
        </intent-filter>
      </receiver>



      <receiver
         android:name="com.example.smsmining.GcmBroadcastReceiver"
         android:permission="com.google.android.c2dm.permission.SEND" >
        <intent-filter>
          <action android:name="com.google.android.c2dm.intent.RECEIVE" />
          <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
          <category android:name="com.example.smsmining" />
        </intent-filter>
      </receiver>
      <service android:name="com.example.smsmining.GCMIntentService" />
        <!-- Unity requests all the runtime permissions when you application starts, all in a row. Uncomment these lines to prevent this from happening-->
        <!--<meta-data-->
                <!--android:name="unityplayer.SkipPermissionsDialog"-->
                <!--android:value="true"/>-->
    </application>

    <!-- PERMISSIONS -->
    <uses-permission android:name="android.permission.INTERNET"/>

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
</manifest>


我正在使用Unity 2018.2.11f1和OneSignal-Unity-SDK-2.11.1

GCM已弃用,请改用FCM。选中此选项,但它在我的另一个unity 2018项目上运行。3.8GCM已被弃用,请改用FCM。检查此项,但它正在我的另一个项目上运行,该项目位于unity 2018.3.8中