Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
SystemAlertWindow
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
SystemAlertWindow
Commits
54e426a5
提交
54e426a5
authored
11月 26, 2025
作者:
史晓晨
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:适配SDK 3.24.5,AGP 8.0+
上级
b9b8d74a
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
39 行增加
和
23 行删除
+39
-23
build.gradle
android/build.gradle
+19
-6
AndroidManifest.xml
android/src/main/AndroidManifest.xml
+1
-2
build.gradle
example/android/app/build.gradle
+6
-0
AndroidManifest.xml
example/android/app/src/debug/AndroidManifest.xml
+2
-3
AndroidManifest.xml
example/android/app/src/main/AndroidManifest.xml
+3
-4
AndroidManifest.xml
example/android/app/src/profile/AndroidManifest.xml
+2
-3
build.gradle
example/android/build.gradle
+1
-1
gradle-wrapper.properties
example/android/gradle/wrapper/gradle-wrapper.properties
+2
-1
main.dart
example/lib/main.dart
+2
-2
pubspec.yaml
example/pubspec.yaml
+1
-1
没有找到文件。
android/build.gradle
浏览文件 @
54e426a5
...
@@ -8,7 +8,7 @@ buildscript {
...
@@ -8,7 +8,7 @@ buildscript {
}
}
dependencies
{
dependencies
{
classpath
'com.android.tools.build:gradle:
7.3
.1'
classpath
'com.android.tools.build:gradle:
8.1
.1'
}
}
}
}
...
@@ -22,16 +22,29 @@ rootProject.allprojects {
...
@@ -22,16 +22,29 @@ rootProject.allprojects {
apply
plugin:
'com.android.library'
apply
plugin:
'com.android.library'
android
{
android
{
compileSdkVersion
34
namespace
"in.jvapps.system_alert_window"
compileSdk
34
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
targetCompatibility
JavaVersion
.
VERSION_1_8
}
// kotlinOptions {
// jvmTarget = '1.8'
// }
sourceSets
{
main
.
java
.
srcDirs
+=
'src/main/kotlin'
test
.
java
.
srcDirs
+=
'src/test/kotlin'
}
defaultConfig
{
defaultConfig
{
minSdkVersion
21
minSdkVersion
21
targetSdkVersion
34
targetSdkVersion
34
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
}
}
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
targetCompatibility
JavaVersion
.
VERSION_1_8
}
lintOptions
{
lintOptions
{
disable
'InvalidPackage'
disable
'InvalidPackage'
}
}
...
...
android/src/main/AndroidManifest.xml
浏览文件 @
54e426a5
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
>
package=
"in.jvapps.system_alert_window"
>
<uses-permission
android:name=
"android.permission.FOREGROUND_SERVICE"
/>
<uses-permission
android:name=
"android.permission.FOREGROUND_SERVICE"
/>
<uses-permission
android:name=
"android.permission.WAKE_LOCK"
/>
<uses-permission
android:name=
"android.permission.WAKE_LOCK"
/>
...
...
example/android/app/build.gradle
浏览文件 @
54e426a5
...
@@ -26,8 +26,14 @@ apply plugin: 'com.android.application'
...
@@ -26,8 +26,14 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
namespace
"in.jvapps.system_alert_window_example"
compileSdkVersion
34
compileSdkVersion
34
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
targetCompatibility
JavaVersion
.
VERSION_1_8
}
/*sourceSets {
/*sourceSets {
main.java.srcDirs += 'src/main/kotlin'
main.java.srcDirs += 'src/main/kotlin'
}*/
}*/
...
...
example/android/app/src/debug/AndroidManifest.xml
浏览文件 @
54e426a5
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
package=
"in.jvapps.system_alert_window_example"
>
<!-- Flutter needs it to communicate with the running application
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
to allow setting breakpoints, to provide hot reload, etc.
-->
-->
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
</manifest>
</manifest>
example/android/app/src/main/AndroidManifest.xml
浏览文件 @
54e426a5
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
package=
"in.jvapps.system_alert_window_example"
>
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
calls FlutterMain.startInitialization(this); in its onCreate method.
...
@@ -19,11 +18,11 @@
...
@@ -19,11 +18,11 @@
<activity
<activity
android:name=
"system_alert_window_example.MainActivity"
android:name=
"system_alert_window_example.MainActivity"
android:configChanges=
"orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:configChanges=
"orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:exported=
"true"
android:hardwareAccelerated=
"true"
android:hardwareAccelerated=
"true"
android:launchMode=
"singleTop"
android:launchMode=
"singleTop"
android:theme=
"@style/LaunchTheme"
android:theme=
"@style/LaunchTheme"
android:windowSoftInputMode=
"adjustResize"
android:windowSoftInputMode=
"adjustResize"
>
android:exported=
"true"
>
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
...
...
example/android/app/src/profile/AndroidManifest.xml
浏览文件 @
54e426a5
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
package=
"in.jvapps.system_alert_window_example"
>
<!-- Flutter needs it to communicate with the running application
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
to allow setting breakpoints, to provide hot reload, etc.
-->
-->
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
</manifest>
</manifest>
example/android/build.gradle
浏览文件 @
54e426a5
...
@@ -5,7 +5,7 @@ buildscript {
...
@@ -5,7 +5,7 @@ buildscript {
}
}
dependencies
{
dependencies
{
classpath
'com.android.tools.build:gradle:
7.3
.1'
classpath
'com.android.tools.build:gradle:
8.1
.1'
}
}
}
}
...
...
example/android/gradle/wrapper/gradle-wrapper.properties
浏览文件 @
54e426a5
...
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
...
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath
=
wrapper/dists
distributionPath
=
wrapper/dists
zipStoreBase
=
GRADLE_USER_HOME
zipStoreBase
=
GRADLE_USER_HOME
zipStorePath
=
wrapper/dists
zipStorePath
=
wrapper/dists
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
7.4-all
.zip
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
8.1-bin
.zip
\ No newline at end of file
example/lib/main.dart
浏览文件 @
54e426a5
...
@@ -6,7 +6,7 @@ import 'dart:ui';
...
@@ -6,7 +6,7 @@ import 'dart:ui';
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
import
'package:share_plus/share_plus.dart'
;
//
import 'package:share_plus/share_plus.dart';
import
'package:system_alert_window/system_alert_window.dart'
;
import
'package:system_alert_window/system_alert_window.dart'
;
import
'custom_overlay.dart'
;
import
'custom_overlay.dart'
;
...
@@ -200,7 +200,7 @@ class _MyAppState extends State<MyApp> {
...
@@ -200,7 +200,7 @@ class _MyAppState extends State<MyApp> {
onPressed:
()
async
{
onPressed:
()
async
{
String
?
logFilePath
=
await
SystemAlertWindow
.
getLogFile
;
String
?
logFilePath
=
await
SystemAlertWindow
.
getLogFile
;
if
(
logFilePath
!=
null
&&
logFilePath
.
isNotEmpty
)
{
if
(
logFilePath
!=
null
&&
logFilePath
.
isNotEmpty
)
{
Share
.
shareFiles
([
logFilePath
]);
//
Share.shareFiles([logFilePath]);
}
else
{
}
else
{
print
(
"Path is empty"
);
print
(
"Path is empty"
);
}
}
...
...
example/pubspec.yaml
浏览文件 @
54e426a5
...
@@ -19,7 +19,7 @@ dev_dependencies:
...
@@ -19,7 +19,7 @@ dev_dependencies:
system_alert_window
:
system_alert_window
:
path
:
../
path
:
../
share_plus
:
^5.0.0
#
share_plus: ^5.0.0
# For information on the generic Dart part of this file, see the
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# following page: https://dart.dev/tools/pub/pubspec
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论