Commit 156efec976379c56de256f9a5cf36aa360d481f3
1 parent
a117a5a3
修改包名,配置证书
Showing
7 changed files
with
37 additions
and
20 deletions
android/app/build.gradle
| ... | ... | @@ -26,9 +26,11 @@ apply plugin: 'kotlin-android' |
| 26 | 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" |
| 27 | 27 | |
| 28 | 28 | android { |
| 29 | - namespace "com.example.wow_english" | |
| 30 | - compileSdkVersion flutter.compileSdkVersion | |
| 31 | - ndkVersion flutter.ndkVersion | |
| 29 | + namespace "com.kouyuxingqiu.wow_english" | |
| 30 | + // compileSdkVersion flutter.compileSdkVersion | |
| 31 | + compileSdkVersion 33 | |
| 32 | + // 展示没有ndk需求 | |
| 33 | + // ndkVersion flutter.ndkVersion | |
| 32 | 34 | |
| 33 | 35 | compileOptions { |
| 34 | 36 | sourceCompatibility JavaVersion.VERSION_1_8 |
| ... | ... | @@ -44,21 +46,30 @@ android { |
| 44 | 46 | } |
| 45 | 47 | |
| 46 | 48 | defaultConfig { |
| 47 | - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). | |
| 48 | - applicationId "com.example.wow_english" | |
| 49 | - // You can update the following values to match your application needs. | |
| 50 | - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. | |
| 51 | - minSdkVersion flutter.minSdkVersion | |
| 52 | - targetSdkVersion flutter.targetSdkVersion | |
| 49 | + applicationId "com.kouyuxingqiu.wow_english" | |
| 50 | + //minSdkVersion flutter.minSdkVersion | |
| 51 | + //targetSdkVersion flutter.targetSdkVersion | |
| 52 | + minSdkVersion 23 | |
| 53 | + targetSdkVersion 33 | |
| 53 | 54 | versionCode flutterVersionCode.toInteger() |
| 54 | 55 | versionName flutterVersionName |
| 55 | 56 | } |
| 56 | 57 | |
| 58 | + signingConfigs { | |
| 59 | + release { | |
| 60 | + storeFile file("../certificate/wow_english") | |
| 61 | + storePassword "wow_english" | |
| 62 | + keyAlias "wow_english" | |
| 63 | + keyPassword "wow_english" | |
| 64 | + } | |
| 65 | + } | |
| 66 | + | |
| 57 | 67 | buildTypes { |
| 68 | + debug { | |
| 69 | + signingConfig signingConfigs.release | |
| 70 | + } | |
| 58 | 71 | release { |
| 59 | - // TODO: Add your own signing config for the release build. | |
| 60 | - // Signing with the debug keys for now, so `flutter run --release` works. | |
| 61 | - signingConfig signingConfigs.debug | |
| 72 | + signingConfig signingConfigs.release | |
| 62 | 73 | } |
| 63 | 74 | } |
| 64 | 75 | } |
| ... | ... | @@ -68,5 +79,4 @@ flutter { |
| 68 | 79 | } |
| 69 | 80 | |
| 70 | 81 | dependencies { |
| 71 | - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | |
| 72 | 82 | } | ... | ... |
android/app/src/main/kotlin/com/example/wow_english/MainActivity.kt deleted
android/app/src/main/kotlin/com/kouyuxingqiu/wow_english/MainActivity.kt
0 → 100644
| 1 | +package com.kouyuxingqiu.wow_english | |
| 2 | + | |
| 3 | +import io.flutter.embedding.android.FlutterActivity | |
| 4 | + | |
| 5 | +class MainActivity : FlutterActivity() { | |
| 6 | + // 测试有效 | |
| 7 | + /*override fun onCreate(savedInstanceState: Bundle?) { | |
| 8 | + super.onCreate(savedInstanceState) | |
| 9 | + Toast.makeText(this, "onCreate", Toast.LENGTH_SHORT).show() | |
| 10 | + }*/ | |
| 11 | +} | ... | ... |
android/build.gradle
| 1 | 1 | buildscript { |
| 2 | - ext.kotlin_version = '1.7.10' | |
| 2 | + ext.kotlin_version = '1.8.21' | |
| 3 | 3 | repositories { |
| 4 | 4 | google() |
| 5 | 5 | mavenCentral() |
| 6 | 6 | } |
| 7 | 7 | |
| 8 | 8 | dependencies { |
| 9 | + // AGP版本,目前自动创建的Gradle版本是用的7.5.0 | |
| 9 | 10 | classpath 'com.android.tools.build:gradle:7.3.0' |
| 10 | 11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" |
| 11 | 12 | } | ... | ... |
android/certificate/wow_english
0 → 100644
No preview for this file type
android/certificate/wow_english_info.png
0 → 100644
117 KB