NDK is missing a "platforms" directory. If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to D:\Program Files\NDK\android-ndk-r25c. If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning. Configuration 'compile' in project ':2048game' is deprecated. Use 'implementation' instead. Parsing the SDK, no caching allowed SDK initialized in 3343 ms FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':2048game'. > java.lang.NullPointerException (no error message) * Try: Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. * Get more help at https://help.gradle.org BUILD FAILED in 17s 执行命令出错,返回值:1。
时间: 2024-04-28 19:20:17 浏览: 99
这个错误信息看起来是Gradle构建时出现的问题。首先,你需要确保NDK路径设置正确,即在local.properties文件中设置正确的NDK目录路径。如果你不需要使用NDK,则需要将ANDROID_NDK_HOME或local.properties中的NDK变量取消设置。
其次,你需要更新Gradle配置,将'compile'替换为'implementation'。这是因为'compile'已经被弃用。
最后,如果以上步骤没有解决问题,建议使用--stacktrace和--debug选项运行Gradle构建,查看详细的错误信息和堆栈跟踪,以便更好地排除问题。
阅读全文