NativeScript / NativeScript/plugins

nativescript-onesignal plugin is failing with Java no class found errors

Open
#555 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
206
Forks
123
Avg merge
2d 1h
Merged PRs (30d)
1

Description

I have followed the instruction provided in your documentation to use the plugin but it fails with the following errors:
While calling the NSOneSignal.getInstance().init method the error is:
Error: java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Intrinsics;

While calling the NativeOneSignal object methods the error is:
Error: java.lang.NoClassDefFoundError: com.onesignal.OneSignal

Is there something that needs to be done besides what's provided in the documentation?
https://market.nativescript.org/plugins/@rwigo/nativescript-onesignal/

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the plugin documentation and reproduce the failure at NSOneSignal.getInstance().init and the NativeOneSignal methods. Investigate the reported Kotlin Intrinsics and com.onesignal.OneSignal class-resolution errors; done means the documented setup loads both classes and the affected calls run without NoClassDefFoundError.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin, typescript
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.