# Fix Android Studio C/C++ project compile issues referencing cmake

**URL:** https://discourse.cmake.org/t/fix-android-studio-c-c-project-compile-issues-referencing-cmake/3400
**Category:** Usage
**Tags:** os:windows, os:android
**Created:** [May 25, 2021, 10:28am UTC](https://discourse.cmake.org/t/fix-android-studio-c-c-project-compile-issues-referencing-cmake/3400 "2021-05-25T10:28:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Bluechip\_Servers](https://discourse.cmake.org/user_avatar/discourse.cmake.org/bluechip_servers/32/1474_2.png) [@Bluechip\_Servers](https://discourse.cmake.org/u/Bluechip_Servers)
#### Post date: [May 25, 2021, 10:28am UTC](https://discourse.cmake.org/t/fix-android-studio-c-c-project-compile-issues-referencing-cmake/3400/1 "2021-05-25T10:28:44Z")

</div>

I have an Android Studio project which has C/C++ functions, when I try to build apk, I get this errors, I have searched online for possible fix but could not ix this particular problem.

Error:

```auto
C/C++ debug|x86 : CMake Error in C:/Projects/codecanyon-oxoo-android-live-tv-movie-portal-app-with-powerful-admin-panel-v1.3.4/codecanyon-oxoo-android-live-tv-movie-portal-app-with-powerful-admin-panel-v1.3.4/V134/Android/Android Source Code/app/.cxx/cmake/debug/x86/CMakeFiles/3.10.2/CMakeCCompiler.cmake:
  cmListFileCache: error can not open file.
Call Stack (most recent call first):
  CMakeLists.txt

```

Any ideas on how to fix this? Thank you!

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [May 25, 2021, 4:48pm UTC](https://discourse.cmake.org/t/fix-android-studio-c-c-project-compile-issues-referencing-cmake/3400/2 "2021-05-25T16:48:02Z")

</div>

It seems that some file is not readable for some reason. Unfortunately, the error message doesn’t mention the file that couldn’t be read. I’ll make an MR that improves the error message at least. Until the, Process Monitor would probably help here.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [May 25, 2021, 4:53pm UTC](https://discourse.cmake.org/t/fix-android-studio-c-c-project-compile-issues-referencing-cmake/3400/3 "2021-05-25T16:53:20Z")

</div>

Oh, the path on the top _is_ the file that failed. Is something wrong with `C:/Projects/codecanyon-oxoo-android-live-tv-movie-portal-app-with-powerful-admin-panel-v1.3.4/codecanyon-oxoo-android-live-tv-movie-portal-app-with-powerful-admin-panel-v1.3.4/V134/Android/Android Source Code/app/.cxx/cmake/debug/x86/CMakeFiles/3.10.2/CMakeCCompiler.cmake`? That seems like an awfully long path (namely some of those directory names).

---

<div class="post-metadata">

### Author: ![Bluechip\_Servers](https://discourse.cmake.org/user_avatar/discourse.cmake.org/bluechip_servers/32/1474_2.png) [@Bluechip\_Servers](https://discourse.cmake.org/u/Bluechip_Servers)
#### Post date: [May 25, 2021, 5:19pm UTC](https://discourse.cmake.org/t/fix-android-studio-c-c-project-compile-issues-referencing-cmake/3400/5 "2021-05-25T17:19:42Z")

</div>

I am happy you solved my problem, this works.
