52ky 发表于 2022-6-15 17:27:21

Android代码调用C++代码和C++代码调用Android代码.doc

代码介绍:
1、点击Button,在Button响应函数中调用setName(String_strName),将EditText中的字符串传给c+t代码setName()。
2、在C++的void setMame()中,接收String,通过showNameInAndroidJNI()反向调用Android的void showNameInAndroid(String _strName),弹出对话框显示String o

(Code introduction:
1. Click button, call setname (string_strname) in the button response function, and pass the string in EditText to the c+t code setname ().
2. In void setmame() of c++, receive a string, call Android void shownameinardroid (string \u strname) in reverse through shownameinardroidjni(), and the pop-up dialog box displays string o)




页: [1]
查看完整版本: Android代码调用C++代码和C++代码调用Android代码.doc