game/godot

Godot 3.0.6 compile Success Process

C/H 2018. 11. 15. 10:13

Godot 3.0.6 compile

Window10 Home

Required

  • SDK API 27 <== build.gradle:compileSdkVersion 27
  • SDK Build Tool 27.0.3 <== build.gradle:buildToolsVersion "27.0.3"
  • NDK 17c

Process

  1. ANDROID_HOME=[AndroidStudoiSdkPath], ANDROID_NDK_ROOT=[17cPath] setting
  2. release/3.0.6-stable Download
  3. https://github.com/godotengine/godot master Download or
    https://github.com/godotengine/godot/tree/master/platform/android/java/gradle/wrapper/ folder file
  4. compile scons platform=android target=release_debug -j8 --config=force
  5. copy(or overwrite) godot-master/platform/android/java/gradle/wapper to godot-3.0.6-stable/platform/android/java/gradle/wapper
  6. Edit godot-3.0.6-stable/platform/android/java/build.gradle
    buildscript {
    	repositories {
    		google()	// append
    		jcenter()
    		
    	}
    	dependencies {
    		// classpath 'com.android.tools.build:gradle:2.2.3'
    		classpath 'com.android.tools.build:gradle:3.2.0'
    		
    	}
    }
    
    apply plugin: 'com.android.application'
    
    allprojects {
    	repositories {
    		jcenter()
    	mavenCentral()
    	google()
    
    	}
    }
    
    dependencies {
    	compile 'com.android.support:support-v4:27.+'  // can be removed if minSdkVersion 16 and modify DownloadNotification.java & V14CustomNotification.java
    
    }
    
    android {
    	lintOptions {
    		abortOnError false
    		disable 'MissingTranslation'
    	}
    
    	compileSdkVersion 27
    	buildToolsVersion "27.0.3"
    	useLibrary 'org.apache.http.legacy'
    
    	packagingOptions {
    		exclude 'META-INF/LICENSE'
    		exclude 'META-INF/NOTICE'
    	}
    	defaultConfig {
    		minSdkVersion 18
    		targetSdkVersion 27
    		
    	}
    	// Both signing and zip-aligning will be done at export time
    	buildTypes.all { buildType ->
    		buildType.zipAlignEnabled false
    		buildType.signingConfig null
    	}
    	sourceSets {
    		main {
    			manifest.srcFile 'AndroidManifest.xml'
    			java.srcDirs = ['src'
    				
    			]
    			res.srcDirs = [
    				'res'
    				
    			]
    			aidl.srcDirs = [
    				'aidl'
    				
    			]
    			assets.srcDirs = [
    				'assets'
    				
    			]
    		}
    		debug.jniLibs.srcDirs = [
    			'libs/debug'
    			
    		]
    		release.jniLibs.srcDirs = [
    			'libs/release'
    			
    		]
    	}
    	/*
    	applicationVariants.all { variant ->
    		// ApplicationVariant is undocumented, but this method is widely used; may break with another version of the Android Gradle plugin
    		variant.outputs.get(0).setOutputFile(new File("${projectDir}/../../../bin", "android_${variant.name}.apk"))
    	}
    	*/
    	applicationVariants.all { variant ->
    		variant.outputs.all { output ->
    			output.outputFileName = "../../../../../../../bin/android_${variant.name}.apk"
    		}
    	}
    }
    
  7. Build
    cd platform\android\java
    gradlew build
    

  8. 108 Issues found!, But No problem

Export Android logcat result


Platform List in NDK versions

  1. android-ndk-r17c
  2. android-ndk-r17-beta2
  3. android-ndk-r16b - include arch-mips, arch-mips-64
  4. ndk-bundle (18.1.5063045)


반응형

'game > godot' 카테고리의 다른 글

Godot3 - I/O Background loading  (0) 2018.11.16
Godot3 API - Singletons (AutoLoad)  (0) 2018.11.15
Godot3 API - Customizing the Web export HTML page  (0) 2018.11.14
Godot3 API - Exporting for the Web  (0) 2018.11.13
Godot3 API - Exporting for Android  (0) 2018.11.12