Scanner icon indicating copy to clipboard operation
Scanner copied to clipboard

异常处理系列:java.util.NoSuchElementException

Open dwlcrr opened this issue 4 years ago • 4 comments

不能运行,报异常了。怎么回事呢。通过定位源码解释:如果迭代器没有更多的元素,就会抛出该异常!

dwlcrr avatar Oct 09 '20 05:10 dwlcrr

这个有具体的错误信息吗

shouzhong avatar Oct 12 '20 03:10 shouzhong

android stuido ndk设置为r16就可以了

FanLiaoKevin avatar Oct 19 '20 08:10 FanLiaoKevin

09:52 Gradle sync failed: Cause: java.util.NoSuchElementException: Collection contains no element matching the predicate. java.util.NoSuchElementException: Collection contains no element matching the predicate. Collection contains no element matching the predicate. Consult IDE log for more details (Help | Show Log) (1 s 864 ms)

@dwlcrr 遇到了一样的问题,不知道你解决没有 ?

Monika-LeeAn avatar Jan 05 '21 01:01 Monika-LeeAn

  1. 使用 gradle --info installDebug 一步步找到了问题

  2. 项目里面所有的 build.gradle 中 : 注释掉 externalNativeBuild { cmake { path "CMakeLists.txt" } } apply from: 'bintray.gradle'

    去掉 defaultConfig ndk 中的所有 armeabi

  3. 然后在 项目的 gradle.properties 中加了一句 android.injected.testOnly=false

  4. 最后 运行 成功了

  5. 然后 出现了 使用LicensePlate会闪退到上一界面

  6. 写在最后的话 :

    出现了 以上的 这些问题 都是自找的 !!!!

    没有认真阅读作者的 README.md

Monika-LeeAn avatar Jan 05 '21 06:01 Monika-LeeAn