Closed a-u-93 closed 2 months ago
What version of the Android Studio, NDK and gradle are you using? This looks like they're too new and we would have to adjust our build files.
@SaschaWillems, hello and thank you for your reply!
I will try to reproduce bug from the scratch.
git clone --recursive https://github.com/KhronosGroup/Vulkan-Samples.git --depth=1
cd Vulkan-Samples
python3 scripts/generate.py android
studio.sh
while processing project by A/Studio, I got a message
Undefined java.home on the project gradle/config.properties file when using the gradleJvm #GRADLE_LOCAL_JAVA_HOME macro. To mitigate the issue, this was changed to use the Embedded JDK (JetBrains Runtime 17.0.11). Select the Gradle JDK location
vulkan_samples.app.main | debug | arm64-v8a Compiler exited with error code 1: /home/alexander/.bin/android_sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -xc++ --target=aarch64-none-linux-android30 --sysroot=/home/alexander/.bin/android_sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DENABLE_HLSL -DENABLE_OPT=0 -DGLSLANG_OSINCLUDE_UNIX -DROOT_PATH_SIZE=39 -DVKB_DEBUG
Android Gradle plugin version 7.4.2 has an upgrade available. Start the AGP Upgrade Assistant to update this project's AGP version.
In my user shell config, BTW, all is ok, I hope (user-level settings are irrelevant here?)
export ANDROID_HOME="$HOME/.bin/android_sdk"
export ANDROID_NDK_HOME="$ANDROID_HOME/ndk/27.1.12297006"
export PATH="$ANDROID_HOME/cmake/3.22.1/bin:$PATH"
export VULKAN_SDK="$HOME/.bin/vulkan_sdk/x86_64"
export PATH=$VULKAN_SDK/bin:$PATH
export LD_LIBRARY_PATH=$VULKAN_SDK/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
export VK_LAYER_PATH=$VULKAN_SDK/share/vulkan/explicit_layer.d
So what Android Studio version are you using? The one from our build docs or something newer?
The latest one
On Tue, Sep 10, 2024, 20:06 Sascha Willems @.***> wrote:
So what Android Studio version are you using? The one from our build docs or something newer?
— Reply to this email directly, view it on GitHub https://github.com/KhronosGroup/Vulkan-Samples/issues/1157#issuecomment-2341505031, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJSJBQ63RBHKUDSHW7V7CX3ZV4RINAVCNFSM6AAAAABN5AL7VKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBRGUYDKMBTGE . You are receiving this because you authored the thread.Message ID: @.***>
And what version is that? And is it newer than what we have in our build instructions?
@SaschaWillems
Android Studio Koala Feature Drop | 2024.1.2
Build #AI-241.18034.62.2412.12266719, built on August 23, 2024
Runtime version: 17.0.11+0-17.0.11b1207.24-11852314 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 6.10.6+bpo-amd64
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 2
Registry:
ide.experimental.ui=true
Current Desktop: Undefined
plugins {
id 'com.android.application'
}
ext.vvl_version='1.3.275.0'
apply from: "./download_vvl.gradle"
android {
compileSdk 33
buildToolsVersion "33.0.0"
ndkVersion "25.2.9519653"
defaultConfig {
applicationId "com.khronos.vulkan_samples"
minSdk 30
targetSdk 33
versionCode 1
versionName "1.0"
externalNativeBuild {
cmake {
abiFilters.addAll( 'arm64-v8a' )
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_static', '-DVKB_VALIDATION_LAYERS=OFF'
}
}
}
buildTypes {
debug {
debuggable true
jniDebuggable true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')
signingConfig debug.signingConfig
}
applicationVariants.all{variant ->
variant.outputs.each{output->
def tempName = output.outputFile.name
tempName = tempName.replace("app-", "vulkan_samples-")
output.outputFileName = tempName
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
sourceSets {
main {
res.srcDirs += [ '../../../app/android/res' ]
java.srcDirs += [ '../../../app/android/java' ]
manifest.srcFile '../../../app/android/AndroidManifest.xml'
}
}
externalNativeBuild {
cmake {
version "3.22.1"
path '../../../CMakeLists.txt'
buildStagingDirectory 'build-native'
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
buildFeatures {
viewBinding true
prefab true
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.8.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.core:core:1.9.0'
implementation 'androidx.games:games-activity:2.0.0'
}
Hello!
Please, suggest a solution to build and deploy sample app for Android.
Debian 12, Vulkan SDK installed and configured in PATH (unnecessary here, as I understand).
I have tried to build both in Android Studio (python script generates gradle project) and via system-level gradle manually.
I have launched gradle config suggested by A. Studio config migration tool.
Manual gradle invocation:
Android studio:
Assets - I did not copy it manually from your external directory, as some manuals suggests.