gpt4 book ai didi

java - 获取 java.lang.IndexOutOfBoundsException : Index: 0, Size: 0 in react native

转载 作者:行者123 更新时间:2023-11-29 22:41:40 24 4
gpt4 key购买 nike

我是 react-native 的新手。当我尝试通过 USB 连接手机(启用 Debug模式)从 android-studio 运行我的应用程序时。 构建成功 & App 已安装到手机中。但是当我尝试打开应用程序时,它立即崩溃。请在 Debug模式下检查错误和 java 行的屏幕截图。

enter image description here

调试错误:

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.parable.rnmvp, PID: 18237
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.get(ArrayList.java:437)
at com.dooboolab.RNIap.RNIapModule.onPurchasesUpdated(RNIapModule.java:517)
at com.dooboolab.RNIap.RNIapModule$11.run(RNIapModule.java:544)
at com.dooboolab.RNIap.RNIapModule$2.onBillingSetupFinished(RNIapModule.java:103)
at com.android.billingclient.api.BillingClientImpl$BillingServiceConnection$1.run(BillingClientImpl.java:1521)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:232)
at android.app.ActivityThread.main(ActivityThread.java:7165)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:576)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:888)

ArrayList.java(错误 block )

public E get(int index) {
if (index >= size)
throw new IndexOutOfBoundsException(outOfBoundsMsg(index)); //line 437 (from this line it throws error)
return (E) elementData[index];
}

请帮我解决这个问题。如果我需要分享任何额外信息。请在评论中提问。

最佳答案

引用@firats评论&issue有人在 react-native-iap 模块上提出,我尝试使用 react-native-iap@4.0.4

现在,这个错误得到了修复。

关于java - 获取 java.lang.IndexOutOfBoundsException : Index: 0, Size: 0 in react native,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58992626/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com