googlesamples/android-vulkan-tutorials

Can't import and build

AndroidDeveloperLB opened this issue · 4 comments

I get this, for example, when trying tutorial06 :

image

ggfan commented

temporarily open your locally generated file: .cdep/modules/cdep-dependencies-config.cmake, find the following code in function(add_cdep_shaderc_dependency target) at the beginning:

  if(NOT CMAKE_SYSTEM_VERSION EQUAL 1)
    set(cdep_determined_android_runtime ${CMAKE_ANDROID_STL_TYPE})
    set(cdep_determined_android_abi ${CMAKE_ANDROID_ARCH_ABI})
    set(cdep_determined_android_platform_level ${CMAKE_SYSTEM_VERSION})
  else()
    set(cdep_determined_android_runtime ${ANDROID_STL})
    set(cdep_determined_android_abi ${ANDROID_ABI})
    set(cdep_determined_android_platform_level ${ANDROID_PLATFORM_LEVEL})
    set(cdep_supports_compiler_features FALSE)
  endif()

change it to:

    set(cdep_determined_android_runtime ${ANDROID_STL})
    set(cdep_determined_android_abi ${ANDROID_ABI})
    set(cdep_determined_android_platform_level ${ANDROID_PLATFORM_LEVEL})
    set(cdep_supports_compiler_features FALSE)

then try to open the project with Android Studio again. Basically just throw away NOT CMAKE_SYSTEM_VERSION EQUAL 1 case. It gets set to TARGET_SDK version, will not be one.

real fix will be uploaded once get help from cdep owner.
Thanks for the bug!

Why not change the repo to have it ready for others to import and build right away?
Can you please fix this issue in the repo somehow?

Anyway, I tried what you wrote, and I still got an error:

image

ggfan commented

this should be fixed now. Thanks!

Still doesn't work. Why close it?

This is again the same issue:
image

BTW, speaking of this sample, some links do not work here:
https://github.com/googlesamples/android-vulkan-tutorials/tree/master/tutorial06_texture
Meaning this:
https://github.com/github.com/google/cdep