reactjs - > 任务:app:compileDebugJavaWithJavac 失败
问题描述
我正在使用以下类从我的应用程序直接调用。
网址:https ://github.com/wumke/react-native-immediate-phone-call
即使我按照上述所有步骤操作,也不允许我打电话。
当我尝试组装我的构建时,请参阅以下错误。
Task :app:compileDebugJavaWithJavac FAILED
/Users/MQ/pinnacle/android/app/src/main/java/com/pinnacle/MainActivity.java:19: error: cannot find symbol
RNImmediatePhoneCallPackage.onRequestPermissionsResult(requestCode, permissions, grantResults); // very important event callback
^
symbol: method onRequestPermissionsResult(int,String[],int[])
location: class RNImmediatePhoneCallPackage
1 error
FAILURE: Build failed with an exception.
想从我的 react native 应用程序直接调用
import com.github.wumke.RNImmediatePhoneCall.RNImmediatePhoneCallPackage;
...
public class MainActivity extends ReactActivity {
...
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
RNImmediatePhoneCallPackage.onRequestPermissionsResult(requestCode, permissions, grantResults); // very important event callback
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
}
}
解决方案
您添加的库中存在一些链接问题。重新安装库并尝试手动链接它们。
推荐阅读
- asp.net - 如何使用 jabber-net 获取消息历史记录(消息归档)
- c++ - 如何从另一个向量中的另一个第一个元素中减去一个向量中的第一个元素?
- javascript - 使用 parseInt 将二维数组字符串元素转换为 int
- javascript - nodejs工作线程共享内存
- python - 如何计算 6 类的 I 类错误?
- rust - 如何匹配 Some(&T)?
- git - 如何在git中获取索引的树哈希?
- arrays - 谷歌工作表中的两个活动工作表基于单元格比较更新错误
- linux - zabbix多条件“不正确的触发器表达式”报错
- spring-boot - REST API 端点的 JUnit 测试用例:我无法访问 uri(MockMvcRequestBuilders.get("/api/jira/getuserstory"))