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.javastartNodeWithArguments is an Integer object (corresponds to a jobject). Android Studio was pointing out an error due to a mismatch in these types.
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 innative-lib.cpp
is ajint
whereas its counterpart in theMainActivity.java
startNodeWithArguments
is an Integer object (corresponds to ajobject
). Android Studio was pointing out an error due to a mismatch in these types.Two possible solutions:
jint
byjobject
in thenative-lib.cpp
Integer
byint
in theMainActivity.java