Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Issue with ClassNotFoundException for local notifications plug-in

Discussion in 'Android' started by kathode, Nov 14, 2016.

  1. kathode

    kathode

    Joined:
    Jan 15, 2013
    Posts:
    63
    Hi,

    I'm having a terrible time getting a local notifications plug-in to work. I keep hitting a ClassNotFoundException no matter what I do. I have a setup with a number of different plug-ins so my manifest is a little complicated. I imagine the issue is there, but I'm not skilled enough with Android to figure it out.

    Here's my main manifest:
    And here's the manifest as it stands with the plug-in:
    And the error I'm getting in logcat upon initializing the plug-in:
    To avoid overwriting my main AndroidManifest.xml, I put the plug-in in its own folder: /Plugins/Android/Notifications. In that directory is the plug-in manifest, the plug-in jar file, and a res/drawable directory for notification icons. I've expanded the jar and verified that the NotificationActivity.class file is contained within.

    Can anyone see where the issue might be?

    Can anyone see where the issue might be?
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    The manifest only declares components and other pieces of data to the Android OS, so it seems unrelated to your issue of a ClassNotFoundException.

    I would check whether that class is included in the final APK as the first step.
     
  3. MaestroMMT

    MaestroMMT

    Joined:
    May 31, 2015
    Posts:
    26
    Both androidManifest.xml should have the same minsdk and targetsdk value. It resolve lots of issue for me. But I agree with liortal.