Support
Quality
Security
License
Reuse
kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample Here
Get all kandi verified functions for this library.
Android NDK samples with Android Studio
QUESTION
AndroidStudio endless 'Scanning files to index...'
Asked 2020-Nov-02 at 07:59I've faced an issue that AndroidStudio has a problem with indexing files that are in the NDK package. So, for example, if we take the standard AndroidStudio example of the NativeActivity (code is also available on GitHub) and activate files indexing (for example by clicking Build->Refresh C++ Projects
) we obtain endless Scanning files to index...
It seems that AndroidStudio does not like the paths where native_app_glue
stuff is located, from CMakeLists.txt from mentioned example:
add_library(native_app_glue STATIC
${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c)
...
target_include_directories(native-activity PRIVATE
${ANDROID_NDK}/sources/android/native_app_glue)
In my case ${ANDROID_NDK}
is /home/nikolay/Projects/Android/AS/Sdk/ndk/21.3.6528147
Nothing helps, no AndroidStudio restart (after restarting AndroidStudio is stuck on Loading project...
), no File->Invalidate Caches/Restart
, no deleting .gradle, .idea, app/.cxx, app/build
folders, no applying Inotify Watches Limit.
But only copying native_app_glue
sources to place without 21.3.6528147
in path, adapting CMake accordingly:
add_library(native_app_glue STATIC
native_app_glue/android_native_app_glue.c)
...
target_include_directories(native-activity PRIVATE
native_app_glue)
deleting .gradle, .idea, app/.cxx, app/build
folders and restart AndroidStudio.
Has anyone faced such an issue or maybe the problem is only in my place? Thanks a lot for any help.
P.S.: Used AndroidStudio is 4.1
ANSWER
Answered 2020-Oct-30 at 18:14Was figured out that it is a known issue in Android Studio 4.1 (thanks @protossor for confirming) and currently under fixing: https://issuetracker.google.com/issues/171801044
So, it only remains to wait for a new Android Studio release to check whether the problem is fixed or not (results will be shared).
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
No vulnerabilities reported
Save this library and start creating your kit
Save this library and start creating your kit
Open Weaver – Develop Applications Faster with Open Source