我学习 Android 开发和使用 Libgdx 框架已经一个多月了,我想创建一个测试应用程序.我要创建的应用程序是一个测验,我一直停留在我将如何存储所有问题和答案的情况上.
I have been learning Android development and using the Libgdx framework for over a month now and want to create a test app. The app i want to create is a quiz and im stuck on the situation on how i am going to store all the questions, answers.
作为一名多年的 Web 开发人员,我当然想到了数据库,但 libgdx 对 sqlite 的支持并不多,这让我陷入了如何在不使用数据库的情况下实现存储.
Being a web developer for many years i of course thought of a database but libgdx doesn't have much support for sqlite which leaves me stuck on how to achieve the storing without using a database.
是否知道任何方式将 sqlite 与 libgdx 一起使用,或者我如何以另一种方式实现这一点,我将不胜感激,谢谢.
Does anyway know any way to use sqlite with libgdx or how i can achieve this another way, i would appreciate the help, thank you.
在这种情况下我不会使用 SQLite.由于它只是一个测试应用程序,您可能不会有数百万个问题,也不需要进行任何类型的查询,我建议您使用 JSON 来存储您的问题.
I would not go with SQLite in this case. Since it is just a test app and you probably won't have millions of questions and won't need to do any kind of querying, I'd suggest you to use JSON to store your questions.
LibGDX 对 JSON 的支持非常好,它也适用于所有平台.查看 wiki 了解一些示例使用它.
The JSON support of LibGDX is pretty good and it works on all platforms as well. Have a look at the wiki to see some examples of how to use it.
此外,这意味着您可以轻松地编辑您的问题,因为它是一种人类可读的文件格式.
Furthermore it means that you can easily edit your questions, since it is a human readable file format.
这篇关于Libgdx 测验 - 使用 SQLite 数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!