ARM-software / vulkan-sdk

Github repository for the Vulkan SDK
Other
228 stars 49 forks source link

projects fail to compile with android studio 3.0 #7

Closed UffiziTerrace closed 7 years ago

UffiziTerrace commented 7 years ago

running android studio 3.0. on win 10 (latest update). projects fail to build. lots cmake and Gradle errors.

josmil1 commented 7 years ago

Hello, I was able to build and run by upgrading to Gradle 3.0.0: https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html

diff --git a/samples/hellotriangle/app/build.gradle b/samples/hellotriangle/app/build.gradle
index 0c8a10f..5dcb805 100644
--- a/samples/hellotriangle/app/build.gradle
+++ b/samples/hellotriangle/app/build.gradle
@@ -6,7 +6,7 @@ def sample = new File(parent).getName()

 android {
     compileSdkVersion 23
-    buildToolsVersion "23.0.2"
+    buildToolsVersion '26.0.2'

     defaultConfig {
         minSdkVersion 21
diff --git a/samples/hellotriangle/build.gradle b/samples/hellotriangle/build.gradle
index 53f4fad..f9eaf75 100644
--- a/samples/hellotriangle/build.gradle
+++ b/samples/hellotriangle/build.gradle
@@ -3,9 +3,10 @@
 buildscript {
     repositories {
         jcenter()
+        google()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.1'
+        classpath 'com.android.tools.build:gradle:3.0.0'

         // NOTE: Do not place your application dependencies here; they belong
         // in the individual module build.gradle files
JoseEmilio-ARM commented 7 years ago

Should be working with latest commit.

UffiziTerrace commented 7 years ago

Completely fresh install of android studio 3.0 build 171.4408382. After importing project, got some cmake errors that where due glm and STB.

Project now compiles and runs. (Android novice converting across from MetalKit and DirectX, hence low level of gradle knowledge.) Many thanks.