Fixed
Status Update
Comments
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #2
Indexing also runs indefinitely here with Android studio 3.3 and a project that contains a NDK library (native engine + game). Previous versions, for instance 3.2.1, worked fine. Still occurs after clearing the caches and deleting the .idea folder. On a desktop with 32 GB of RAM it's not running out of memory but it indexes forever, pegging an entire CPU and disk access to 100%, and it never stops. The same thing occurs with gradle 4.6 or 4.10. If I enable the experimental scan active configuration only setting, everything is basically broken - no syntax highlighting, cpp files don't show. Waiting to see if there's a workaround before reverting to 3.2.1 and being much more cautious about updating in the future ..
b9...@gmail.com <b9...@gmail.com> #3
When I let it run for hours, the scanning eventually did complete, then the indexing took more hours, I let it run as well, and eventually it switched to 'building symbols' which also started taking a long time without progress, but that, eventually, crashed Android Studio with an out of memory error, telling me to increase the heap size. I did, and upon restarting Android Studio, it started over at scanning .. so I gave up for now. This is with a mid-size NDK project.
il...@google.com <il...@google.com> #4
Even after a dirty downgrade to AS 3.2 from 3.3 my project was stuck on scanning files to index and building symbols. I ended up having to fully remove all Android Studio files/folders. After relaunching AS 3.2 and setting heap size to 8GB the scanning, indexing and building symbols took just a couple minutes.
mc...@gmail.com <mc...@gmail.com> #5
These were the folders I deleted:
rm -rfv ~/Library/Application\ Support/AndroidStudio*
rm -rfv ~/Library/Preferences/AndroidStudio*
rm -rfv ~/Library/Caches/AndroidStudio*
rm -rfv ~/Library/Logs/AndroidStudio*
rm -rfv ~/.AndroidStudio*
rm -rfv ~/Library/Application\ Support/AndroidStudio*
rm -rfv ~/Library/Preferences/AndroidStudio*
rm -rfv ~/Library/Caches/AndroidStudio*
rm -rfv ~/Library/Logs/AndroidStudio*
rm -rfv ~/.AndroidStudio*
tr...@gmail.com <tr...@gmail.com> #6
Any chance someone has a repro project they can share?
@brigham, are you saying deleting those folders help with your issue?
@brigham, are you saying deleting those folders help with your issue?
il...@google.com <il...@google.com> #7
@tianyu, just a heads up, this may be related to the configuration cache issue you've been looking at.
za...@groundcrewdev.com <za...@groundcrewdev.com> #8
I am facing the exact same issues here. I have two projects where I build native code outside of Android Studio (Cygwin shell + ndk-build.cmd) and that goes fine in AS 3.3. But one project where I use externalNativeBuild in the gradle file has the same issues as described here. The native library part is not that big (couple of .cpp and ..h files). It is like it is scanning the entire NDK. Switching back to AS 3.2 solves it.
Update: if I use Process Monitor I can see it scan my entire disk: studio64.exe accesses even my Pictures folder!
Update: if I use Process Monitor I can see it scan my entire disk: studio64.exe accesses even my Pictures folder!
jb...@google.com <jb...@google.com> #9
Thanks Jomo and everyone. We recently identified a bug that could be related to this.
Hi Davy, can you share the directory structure of your project. Where is the NDK located with respect to the project? Also where are your cpp files with respect to the rest of the project files?
Hi Davy, can you share the directory structure of your project. Where is the NDK located with respect to the project? Also where are your cpp files with respect to the rest of the project files?
za...@groundcrewdev.com <za...@groundcrewdev.com> #10
On my end, the files built into the native library are outside the project tree seen by Android Studio (they're accessed in the CMakeList file with eg. ../../../../folder/file.cpp). It sounds like this may trigger the issue
il...@google.com <il...@google.com> #11
@Emmanuel, do you have only sources outside of the project tree or also CMakeLists.txt?
li...@gmail.com <li...@gmail.com> #12
Only the sources; CMakeLists.txt is under "app" in the tree that is seen by Android Studio
[Deleted User] <[Deleted User]> #13
Thanks for looking into this btw, much appreciated!
sa...@bluevine.com <sa...@bluevine.com> #14
Common factor here seems to be that cpp files are located out of android studio/gradle directory structure.
In our case, we use separate android module/library to build cpp files. That module is not a subdirectory of the root project, but located ../../xxx/yyy location. cpp files that this module builds, are also located in multiple levels down from module root level. eg ../../xx/yy.
I think there is a bug somewhere where it resolves the paths. I'm quite sure that it would work if I create enough empty dummy directories before android studio directory, so that it would not leak out from there, or a separate empty disk image for project :)
This "scanning files bug" has been there also in 3.3 preview. I reported that herehttps://issuetracker.google.com/issues/112927150 on August 2018.
In our case, we use separate android module/library to build cpp files. That module is not a subdirectory of the root project, but located ../../xxx/yyy location. cpp files that this module builds, are also located in multiple levels down from module root level. eg ../../xx/yy.
I think there is a bug somewhere where it resolves the paths. I'm quite sure that it would work if I create enough empty dummy directories before android studio directory, so that it would not leak out from there, or a separate empty disk image for project :)
This "scanning files bug" has been there also in 3.3 preview. I reported that here
ra...@gmail.com <ra...@gmail.com> #15
@tg
The NDK is in a subfolder of F:\Android
CPP files are in subfolders of the project's src/main/jni folder (F:\Development\AS\USBTester\USBTester\src\main\jni)
I have a zip file with a project I can send to you if you contact me privately.
The NDK is in a subfolder of F:\Android
CPP files are in subfolders of the project's src/main/jni folder (F:\Development\AS\USBTester\USBTester\src\main\jni)
I have a zip file with a project I can send to you if you contact me privately.
jb...@google.com <jb...@google.com> #16
Thanks Davy, I'm emailing you privately
re...@gmail.com <re...@gmail.com> #17
Same situation and same problem with 3.3: we've got cpp files outside of (C:\programs\projectName\src) our Android Studio project structure (C:\programs\projectName\build\android). Android Studio indexes the entire drive and runs out of memory while "loading symbols" and crashes.
In the app.iml file, it looks like Android Studio has added C:\ as a sources root. Manually changing that to C:\programs\projectName and restarting Android Studio causes the first round of indexing to complete quickly and behave normally for a few seconds, after which it overwrites the file almost immediately with the same C:\ sources root again, after which it enters the same indexing loop forever.
In the app.iml file, it looks like Android Studio has added C:\ as a sources root. Manually changing that to C:\programs\projectName and restarting Android Studio causes the first round of indexing to complete quickly and behave normally for a few seconds, after which it overwrites the file almost immediately with the same C:\ sources root again, after which it enters the same indexing loop forever.
Description
Version used: 2.5.0-alpha06
After upgraded Lifecycle to 2.5.0-alpha06, the nested NavHost navigation will crash.
p.s. I keep the old version dependencies in build.gradle, you could try the working version.