Assigned
Status Update
Comments
pe...@google.com <pe...@google.com>
ka...@google.com <ka...@google.com> #2
This would indeed be very useful feature I think. Currently, my only alternative is to reorganize all my subfolders and their contents to be in the top-most directory of which I know the name of. First of all, this results in this directory having thousands of files, each with a VERY long name to properly identify it based on its original path. Secondly, it requires additional effort on the reorganizing side of things; I need some script to do something I feel should've been part of the NDK...I mean there's already a function for iterating over files, why not folders as well?
Just my two cents :)
Just my two cents :)
kl...@gmail.com <kl...@gmail.com> #3
I agree that it would be a useful feature, the alternatives that I have seen require either the user to avoid folders altogether, a Java backend (which is one of the things the NDK tries to avoid) or finding the apk as zip and searching for directories (slow & unnecessary).
kl...@gmail.com <kl...@gmail.com> #4
That's frustrating...But for those who are looking for a pure C++ solution, I would recommend using Qt Framework on Android. You can iterate over folders with the following code snippet:
foreach (const QString& dirName, QDir("assets:/").entryList(QDir::AllDirs | QDir::NoDotAndDotDot)
Qt probably uses a Java backend for this, but it works at the end. You can use many Qt classes across multiple operating systems without thinking about all that garbage. They handle all the wrappers etc for you. Just a little suggestion 👍🏻
foreach (const QString& dirName, QDir("assets:/").entryList(QDir::AllDirs | QDir::NoDotAndDotDot)
Qt probably uses a Java backend for this, but it works at the end. You can use many Qt classes across multiple operating systems without thinking about all that garbage. They handle all the wrappers etc for you. Just a little suggestion 👍🏻
kl...@gmail.com <kl...@gmail.com> #5
I would love to see this feature implemented as well. I'd love to be able to organize assets by directory in the NDK without using some weird hack or importing a massive framework like Qt -- my binary size right now is minuscule, and I'd likely quadruple it by bringing in Qt. That's not even to mention the fact that apps that don't rely on Qt would be swatting flies with sledgehammers by solving this issue by linking to Qt.
ka...@google.com <ka...@google.com> #6
Yes Qt is a massive framework. It's not an optional solution for such a small problem, I didn't want to mean that; I was meaning the shifting of entire development platform from Android to fully cross-platform Qt C++ Framework (for a few reasons):
* Qt is a C++ platform; whereas Android is not exactly (Java, Kotlin and all that garbage is the primary focus of Android)
* Qt is better maintained in terms of C++
* Apps written with Qt can work on Android, iOS, macOS, Windows, *nix, Linux, Embedded... with a single code base
* Qt has built-in cross-platform key features like event driven programming, media encoding/playing, animations, networking, databasing, image encoding/rendering, purchasing, scripting, data visualization, 2d/3d rendering etc. (you would normally find a 3rd party library for every one of those features on Android or write your own solution)
Anyway, that's just a suggestion.
* Qt is a C++ platform; whereas Android is not exactly (Java, Kotlin and all that garbage is the primary focus of Android)
* Qt is better maintained in terms of C++
* Apps written with Qt can work on Android, iOS, macOS, Windows, *nix, Linux, Embedded... with a single code base
* Qt has built-in cross-platform key features like event driven programming, media encoding/playing, animations, networking, databasing, image encoding/rendering, purchasing, scripting, data visualization, 2d/3d rendering etc. (you would normally find a 3rd party library for every one of those features on Android or write your own solution)
Anyway, that's just a suggestion.
ka...@google.com <ka...@google.com> #7
Please add a AAssetDir_getNextFileOrDirectoryName or similar. This is essential and basic functionality that shouldn't be missing.
ka...@google.com <ka...@google.com> #8
+1
ma...@gmail.com <ma...@gmail.com> #9
Keep up the good work.
Description
I'm using gcc 13.x from Fedora rawhide
cmake -L output:
And build fails with
After add below patch:
Build fails as well with