Search Unity

AndroidJavaException

Discussion in 'Unity Ads & User Acquisition' started by mcconrad, Dec 18, 2014.

  1. mcconrad

    mcconrad

    Joined:
    Jul 16, 2013
    Posts:
    155
    recently with my new build, i am getting the following error when attempting to load ads (from real android device):
    java.lang.ClassNotFoundException: com.package.name.Ads
     
  2. mcconrad

    mcconrad

    Joined:
    Jul 16, 2013
    Posts:
    155
    any reply would be appreciated since my app is to supposedly go live in less than a week and this error just appeared without me changing ANY code from unity ads
     
  3. unity-nikkolai

    unity-nikkolai

    Joined:
    Sep 18, 2014
    Posts:
    540
    Which version of Unity are you building with (4.6 or 5.0)?

    Not sure where this error is coming from. Doesn't look like it's part of Unity Ads. What does the rest of the logcat say leading up to this point?
     
  4. mcconrad

    mcconrad

    Joined:
    Jul 16, 2013
    Posts:
    155
    using android 5.01, unity 4.6
     
  5. unity-nikkolai

    unity-nikkolai

    Joined:
    Sep 18, 2014
    Posts:
    540
    I can't remember which plugins you were using. Is it just Unity Ads or did you have another asset package in there for handling native services and platform integration?
     
  6. mcconrad

    mcconrad

    Joined:
    Jul 16, 2013
    Posts:
    155
    i do have android native plugin which has access to the android manifest xml. i merged them but there might be some error.

    EDIT: however this was not a problem before 2 days ago. i dont think either asset has been updated within that time.
     
  7. unity-nikkolai

    unity-nikkolai

    Joined:
    Sep 18, 2014
    Posts:
    540
    Can you share your project with me so I can look it over and test it?

    If you have a private repro on Github for it, you can add me as wcoastsands. Otherwise export the entire project using Asset > Export Package... from the menu bar. Then just post it to Dropbox or Google Drive and share the link with me.
     
  8. mcconrad

    mcconrad

    Joined:
    Jul 16, 2013
    Posts:
    155
    it is several gigabytes, even when compressed
     
  9. mcconrad

    mcconrad

    Joined:
    Jul 16, 2013
    Posts:
    155
    it has something to do with android 5 update. the ads run fine on android 4.4, but either crash the app or just skip on android 5 and 5.1
     
  10. unity-nikkolai

    unity-nikkolai

    Joined:
    Sep 18, 2014
    Posts:
    540
    Are you sure the native plugin isn't causing the issue? I know Android 5 has made a few changes with web view.
     
  11. mcconrad

    mcconrad

    Joined:
    Jul 16, 2013
    Posts:
    155
    seems certain, the native plugin works in both versions of android without issue (recorded successful in app purchases on both versions), but whenever the ads are loaded in update 5, the app crashes or just skips with the previously stated error.

    the native plugin is only loaded in 1 scene, whereas the ads are loaded into an object with the donotdestroyonload call and crash on every scene.

    also the ads ran fine on my mobile until i updated to android 5, without any change in the build between 4.4 and 5.

    aside from sending the project, which is too big, what other steps can i do to help solve this issue? i cannot publish live until this is fixed and it was slated to go live on christmas day.

    thank you for looking into this.