googlesamples / vulkan-basic-samples

Other
498 stars 111 forks source link

'API-Samples/android/' must not contain .... Set the 'rootProject.name' #28

Closed dacobi closed 5 years ago

dacobi commented 5 years ago

When trying to compile in Android Studio 3.4 in Manjaro I get the following error:

The project name 'API-Samples/android/' must not contain any of the following characters: [/, \, :, <, >, ", ?, *, |]. Set the 'rootProject.name' or adjust the 'include' statement

I'm not really sure where in gradle the error is?

dacobi commented 5 years ago

Ok, tried deleting all things Android Studio and reinstalled.

First when install the vulkan samples the compile stops because ndk is not installed. So I install and restart. Now vulkan samples compile but the module list is not updated so I can't run a module.

So I tried loading another copy of vulkan samples. Here they compile fine, then asks me to reload and the modules appears and then I get the original error again...

dacobi commented 5 years ago

The error only occurs after updating the Android Gradle Plugin:

"To take advantage of the latest features, improvements, and security fixes, we strongly recommend that you update the Android Gradle plugin to version 3.4.0 and Gradle to version 5.1.1. Release notes Android plugin 3.2.0 and higher now support building the Android App Bundle—a new upload format that defers APK generation and signing to compatible app stores, such as Google Play. With app bundles, you no longer have to build, sign, and manage multiple APKs, and users get smaller, more optimized downloads. Learn more"

If I cancel this update the samples build fine.

ggfan commented 5 years ago

thank you for reporting the issue. Probably should go to basics when using gradle for configuration concerning long term support. you could fix it locally with "customized the gradle project directory", something similar to ( will close this one and create one in upstream for fix later ):

[
    '01-init_instance',
    '02-enumerate_devices',
    '03-init_device',
    '04-init_command_buffer',
    '05-init_swapchain',
    '06-init_depth_buffer',
    '07-init_uniform_buffer',
    '08-init_pipeline_layout',
    '09-init_descriptor_set',
    '10-init_render_pass',
    '11-init_shaders',
    '12-init_frame_buffers',
    '13-init_vertex_buffer',
    '14-init_pipeline',
    '15-draw_cube',
    '16-vulkan_1_1',
    'enumerate_devices_adv',
    'init_texture',
    'multithreaded_command_buffers',
    'draw_textured_cube',
    'dynamic_uniform',
    'texel_buffer',
    'events',
    'instance_layer_properties',
    'instance_extension_properties',
    'instance_layer_extension_properties',
    'create_debug_report_callback',
    'enable_validation_with_callback',
    'multiple_sets',
    'copy_blit_image',
    'template',
    'separate_image_sampler',
    'input_attachment',
    'occlusion_query',
    'pipeline_cache',
    'pipeline_derivative',
    'push_descriptors',
    'immutable_sampler',
    'push_constants',
    'draw_subpasses',
    'secondary_command_buffer',
    'spirv_assembly',
    'spirv_specialization',
    'memory_barriers',
    'validation_cache',
    'vulkan_1_1_flexible'
].each {
    include ":${it}"
    project(":${it}").projectDir = new File("API-Samples/android/${it}")
}
ggfan commented 5 years ago

https://github.com/LunarG/VulkanSamples/issues/227 created, closing this one