首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >react本地批处理不构建android

react本地批处理不构建android
EN

Stack Overflow用户
提问于 2022-07-26 14:19:12
回答 1查看 63关注 0票数 1

我使用的是react 17和react原生的0.68.2和反应-本机批,而不是在android上构建的。我已经完成了安卓和iOS部件的所有设置(编辑所有build.gradle等)。我还没有实现这个图书馆的任何东西。这给了我一个错误,而构建在新的安装。

它给了我这个错误:

代码语言:javascript
复制
/Users/xxx/xxx/xxx/packages/native-client/node_modules/@bam.tech/react-native-batch/android/src/main/java/tech/bam/RNBatchPush/RNUtils.java:113: error: no suitable method found for put(String,URI)
                batchEventData.put(key, URI.create(valueMap.getString("value")));
                              ^
    method BatchEventData.put(String,String) is not applicable
      (argument mismatch; URI cannot be converted to String)
    method BatchEventData.put(String,float) is not applicable
      (argument mismatch; URI cannot be converted to float)
    method BatchEventData.put(String,double) is not applicable
      (argument mismatch; URI cannot be converted to double)
    method BatchEventData.put(String,int) is not applicable
      (argument mismatch; URI cannot be converted to int)
    method BatchEventData.put(String,long) is not applicable
      (argument mismatch; URI cannot be converted to long)
    method BatchEventData.put(String,boolean) is not applicable
      (argument mismatch; URI cannot be converted to boolean)
    method BatchEventData.put(String,Date) is not applicable
      (argument mismatch; URI cannot be converted to Date)
/Users/xxx/xxx/xxx/packages/native-client/node_modules/@bam.tech/react-native-batch/android/src/main/java/tech/bam/RNBatchPush/RNBatchModule.java:529: error: no suitable method found for setAttribute(String,URI)
                editor.setAttribute(key, URI.create(url));
                      ^
    method BatchUserDataEditor.setAttribute(String,long) is not applicable
      (argument mismatch; URI cannot be converted to long)
    method BatchUserDataEditor.setAttribute(String,double) is not applicable
      (argument mismatch; URI cannot be converted to double)
    method BatchUserDataEditor.setAttribute(String,boolean) is not applicable
      (argument mismatch; URI cannot be converted to boolean)
    method BatchUserDataEditor.setAttribute(String,Date) is not applicable
      (argument mismatch; URI cannot be converted to Date)
    method BatchUserDataEditor.setAttribute(String,String) is not applicable
      (argument mismatch; URI cannot be converted to String)

如果有人已经面对过这个问题。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-07-26 15:23:37

我在阿诺-罗兰:https://github.com/bamlab/react-native-batch-push/issues/83的帮助下设法解决了这个问题。

build.gradle中,您需要升级batchSdkVersion的版本

代码语言:javascript
复制
ext {
    batchSdkVersion = '1.19+'
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73125071

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档