5

I am using Android Studio 3.5 in macos mojave

I had a project containing both java and ndk code in a folder, lets call it "project_folder_A"

I made a copy of this folder, renamed it to "project_folder_B" and continued to make modifications; project_folder_A is now deleted

Everything works as expected, however, if I try to clean the project, or change it from current "release" mode to "debug" mode to compile again, I get an error saying

ninja: fatal: chdir to '..!!folder_path!!.../project_folder_A/app/.cxx/cmake/debug/armeabi-v7a' - No such file or directory    

I cannot find a reference to project_folder_A anywhere inside the current project or in the gradle files. Why is android studio still remembering the old project folder? How do I remove all reference to the old folder name and force everything to compile using the current project folder?

--- EDIT:

Looking at the long error message more closely, the exact problem is this line

Error while executing process ..!!sdk path!!.../Android/sdk/cmake/3.10.2.4988404/bin/ninja with arguments {-C ..!!folder_path!!.../project_folder_A/app/.cxx/cmake/debug/armeabi-v7a clean}  

which causes an error because project_folder_A doesn't exist. All the other exception errors in the long build error message seem to have been caused by this error.

2
  • look for references of project_folder_A in local.properties & gradle.properties. Commented Dec 27, 2019 at 2:30
  • @HarshvardhanJoshi it is not there Commented Dec 27, 2019 at 2:32

2 Answers 2

12

You should delete the generated .cxx folder and the "build" folder. They both contain artifacts that contain irrelevant past data. attempt a clean build

Sign up to request clarification or add additional context in comments.

Comments

2

@Kowi's answer was the only thing that worked for me when I was faced by the exact situation described above.

I deleted the .cxx folder inside the app directory of the project.(If it doesn't work maybe you can delete the build folder too as suggested by @Kowi, I didn't do that though)

The .cxx folder is a hidden folder though so unhide it with the CMD+SHIFT+DOT combination on a Mac and equivalent combos for other Operating Systems.

Once I deleted, I rebuilt the project and I was fine.

You should be fine too!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.