Skip to content

Android: Return type of native function call does not match #36

@1407arjun

Description

@1407arjun

This is regarding the sample project for android (both with and without the nodejs folder). The return type of the Java_com_yourorg_sample_MainActivity_startNodeWithArguments function in native-lib.cpp is a jint whereas its counterpart in the MainActivity.java startNodeWithArguments is an Integer object (corresponds to a jobject). Android Studio was pointing out an error due to a mismatch in these types.

Two possible solutions:

  1. Replace jint by jobject in the native-lib.cpp
  2. Replace Integer by int in the MainActivity.java

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions