Skip to content

Commit

Permalink
重构路径,清楚缓存,解决Android开空白屏
Browse files Browse the repository at this point in the history
  • Loading branch information
molihuan committed May 13, 2024
1 parent 90990c6 commit bee85f3
Show file tree
Hide file tree
Showing 116 changed files with 2,229 additions and 2,832 deletions.
2 changes: 1 addition & 1 deletion .fvm/fvm_config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"flutterSdkVersion": "3.13.9",
"flutterSdkVersion": "3.19.3",
"flavors": {}
}
2 changes: 1 addition & 1 deletion .github/workflows/release_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# Build apk.打包各架构版本
- run: flutter build apk --split-per-abi
# Upload generated apk to the artifacts.
- uses: actions/upload-artifact@v3.1.3
- uses: actions/upload-artifact@v4
with:
# Artifact name
name: release-android.zip
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ migrate_working_dir/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.metadata
.packages
.pub-cache/
.pub/
Expand Down
15 changes: 15 additions & 0 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@ migration:
- platform: android
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
- platform: ios
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
- platform: linux
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
- platform: macos
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
- platform: web
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
- platform: windows
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728

# User provided section

Expand Down
14 changes: 0 additions & 14 deletions .vscode/settings.json

This file was deleted.

3 changes: 1 addition & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if (flutterVersionName == null) {
}

android {
namespace "com.molihuan.note"
namespace "com.molihuan.videonote"
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

Expand All @@ -42,7 +42,7 @@ android {

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.molihuan.note"
applicationId "com.molihuan.videonote"
// 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 23
Expand Down
3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />

<application
android:preserveLegacyExternalStorage="true"
android:requestLegacyExternalStorage="true"
android:label="hlvideonote"
android:label="videonote"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.molihuan.note
package com.molihuan.videonote

import io.flutter.embedding.android.FlutterActivity

Expand Down
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pluginManagement {
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.9.0" apply false
id "org.jetbrains.kotlin.android" version "1.9.24" apply false
}

include ":app"
18 changes: 14 additions & 4 deletions doc/md/zh_CN/CompilationNotes/Android.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@
```xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android">


<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />


<application android:preserveLegacyExternalStorage="true"
android:requestLegacyExternalStorage="true" android:label="note"
android:requestLegacyExternalStorage="true" android:label="videonote"
android:name="${applicationName}" android:icon="@mipmap/ic_launcher">
```

Expand All @@ -28,10 +32,16 @@

## 注意

安卓的包名必须为

```

```sh
安卓的包名为:
com.molihuan.note

minSdkVersion 23

id "org.jetbrains.kotlin.android" version "1.9.24"
```

否则会白屏无法进入页面


4 changes: 4 additions & 0 deletions doc/md/zh_CN/DevelopmentEnvironment.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
```shell
查看详细配置信息
flutter doctor -v
创建包名为com.molihuan.videonote的项目
flutter create --org com.molihuan videonote
创建所有平台
flutter create .
生成安卓端代码
flutter create --platforms android .
(安卓的包名必须为com.molihuan.note否则会白屏无法进入页面)
Expand Down
1 change: 0 additions & 1 deletion ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
1 change: 0 additions & 1 deletion ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
45 changes: 0 additions & 45 deletions ios/Podfile

This file was deleted.

Loading

0 comments on commit bee85f3

Please sign in to comment.