Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1407arjun opened this issue Sep 15, 2021 · 1 comment
Open

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

1407arjun opened this issue Sep 15, 2021 · 1 comment

Comments

@1407arjun
Copy link

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
@JaosnHsieh
Copy link
Contributor

try this hello world example

there are some scripts needed changes I found it here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants