반응형
매너미 - MannersMe 앱 개발 수정 작업일지 #1
이 글을 읽으시는 분들 모두 추앙합니다.
1.매너미 - MannersMe 개발 환경
1)Flutter 개발환경 맞추기
ㄴ 전달받은 소스로 Flutter Project 실행 시, 실행이 되지 않음. 기존 개발 환경과 맞지 않다고 에러가 발생
ㄴ 신규 Flutter Project를 생성함 > 실행됨.
2)Flutter upgrade 진행
3)Flutter get, Flutter update 진행
Android 수정
1.settings.gradle 수정
include ":app"
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
2.build.gradle 수정
1)환경 수정
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '4'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.1.2'
}
def flutterMinSdkVersion = localProperties.getProperty('flutter.minSdkVersion')
if (flutterMinSdkVersion == null) {
flutterMinSdkVersion = '23'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2)namespace 수정
android {
namespace "com.mannersme.mannersme"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.mannersme.mannersme"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutterMinSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
2.MainActivity.kt 수정
ㄴ package 수정 : com.mannersme.mannersme.mannesme > com.mannersme.mannersme로 수정
package com.mannersme.mannersme
4.Flutter app 실행
ㄴ flutter run
매너미 앱이 정상작동합니다.
다음 글은 안드로이드 BackButton 시, 종료팝업 띄우는 작업입니다.
반응형
'Flutter' 카테고리의 다른 글
매너미 - MannersMe 앱 수정 작업일지 #3 (0) | 2023.12.10 |
---|---|
매너미 - MannersMe 앱 수정 작업일지 #2 (0) | 2023.12.10 |
Flutter로 요양보호사 자격증 취득하기 앱 개발 #2 (0) | 2023.07.17 |
Flutter로 요양보호사 자격증 취득하기 앱 개발 (0) | 2023.07.10 |
Flutter 설정 시, sdkmanager 미인식 문제 해결 (0) | 2020.05.11 |