提交 51ae530b authored 作者: 史晓晨's avatar 史晓晨

调试-90%

上级 403f3632
...@@ -2,7 +2,7 @@ group 'com.clx.account_center' ...@@ -2,7 +2,7 @@ group 'com.clx.account_center'
version '1.0-SNAPSHOT' version '1.0-SNAPSHOT'
buildscript { buildscript {
ext.kotlin_version = '1.8.10' ext.kotlin_version = '1.8.20'
repositories { repositories {
maven { setUrl("https://maven.aliyun.com/repository/central") } maven { setUrl("https://maven.aliyun.com/repository/central") }
maven { setUrl("https://maven.aliyun.com/repository/jcenter") } maven { setUrl("https://maven.aliyun.com/repository/jcenter") }
...@@ -14,7 +14,7 @@ buildscript { ...@@ -14,7 +14,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.1.3' classpath 'com.android.tools.build:gradle:8.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
} }
} }
...@@ -38,11 +38,19 @@ apply plugin: 'com.android.library' ...@@ -38,11 +38,19 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
android { android {
compileSdkVersion 31 namespace "com.clx.account_center"
// 1. 升级 compileSdk 至 36(AGP 8.13 最佳兼容版本,替代 compileSdkVersion)
compileSdk 34
// 2. JDK 版本需升级至 17(AGP 8.13 强制要求)
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_17
}
// 3. Kotlin JVM 目标版本同步为 17
kotlinOptions {
jvmTarget = '17'
} }
// packagingOptions { // packagingOptions {
...@@ -51,16 +59,12 @@ android { ...@@ -51,16 +59,12 @@ android {
// pickFirst "lib/armeabi-v7a/libc++_shared.so" // pickFirst "lib/armeabi-v7a/libc++_shared.so"
// } // }
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets { sourceSets {
main.java.srcDirs += 'src/main/kotlin' main.java.srcDirs += 'src/main/kotlin'
} }
defaultConfig { defaultConfig {
minSdkVersion 19 minSdkVersion 21
} }
viewBinding { viewBinding {
enabled = true enabled = true
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android">
package="com.clx.account_center">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.CAMERA" />
...@@ -9,25 +8,23 @@ ...@@ -9,25 +8,23 @@
<!-- 必要权限,安装权限 --> <!-- 必要权限,安装权限 -->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<!--拨打电话权限--> <!--拨打电话权限-->
<uses-permission android:name="android.permission.CALL_PHONE"/> <uses-permission android:name="android.permission.CALL_PHONE" />
<!--允许获取精确位置,精准定位必选--> <!--允许获取精确位置,精准定位必选-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!--允许获取粗略位置,粗略定位必选--> <!--允许获取粗略位置,粗略定位必选-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS"/> <uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" /> <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" /> <uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<application <application android:usesCleartextTraffic="true">
android:usesCleartextTraffic="true"
>
<activity <activity
android:theme="@style/AppTheme"
android:name="com.clx.account_center.H5Activity" android:name="com.clx.account_center.H5Activity"
android:exported="true"> android:exported="true"
android:theme="@style/AppTheme">
<!-- 深度链接配置 --> <!-- 深度链接配置 -->
</activity> </activity>
</application> </application>
......
...@@ -26,16 +26,21 @@ apply plugin: 'kotlin-android' ...@@ -26,16 +26,21 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 33 namespace "com.clx.account_center_example"
ndkVersion flutter.ndkVersion ndkVersion flutter.ndkVersion
// 1. 升级 compileSdk 至 36(AGP 8.13 最佳兼容版本,替代 compileSdkVersion)
compileSdk 34
// 2. JDK 版本需升级至 17(AGP 8.13 强制要求)
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_17
} }
// 3. Kotlin JVM 目标版本同步为 17
kotlinOptions { kotlinOptions {
jvmTarget = '1.8' jvmTarget = '17'
} }
sourceSets { sourceSets {
...@@ -48,7 +53,7 @@ android { ...@@ -48,7 +53,7 @@ android {
// You can update the following values to match your application needs. // You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 32 targetSdkVersion 31
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName
multiDexEnabled true multiDexEnabled true
...@@ -74,5 +79,5 @@ flutter { ...@@ -74,5 +79,5 @@ flutter {
} }
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
} }
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android">
package="com.clx.account_center_example">
<!-- The INTERNET permission is required for development. Specifically, <!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application the Flutter tool 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>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android">
package="com.clx.account_center_example">
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.CAMERA" />
...@@ -10,40 +10,40 @@ ...@@ -10,40 +10,40 @@
<!-- 必要权限,安装权限 --> <!-- 必要权限,安装权限 -->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<!--拨打电话权限--> <!--拨打电话权限-->
<uses-permission android:name="android.permission.CALL_PHONE"/> <uses-permission android:name="android.permission.CALL_PHONE" />
<!--允许获取精确位置,精准定位必选--> <!--允许获取精确位置,精准定位必选-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!--允许获取粗略位置,粗略定位必选--> <!--允许获取粗略位置,粗略定位必选-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS"/> <uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" /> <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" /> <uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.RECORD_AUDIO" />
<application <application
android:label="account_center_example"
android:name="${applicationName}" android:name="${applicationName}"
android:icon="@drawable/img"> android:icon="@drawable/img"
android:label="account_center_example">
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:exported="true" android:exported="true"
android:hardwareAccelerated="true"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@style/LaunchTheme" android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as <!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. --> to determine the Window background behind the Flutter UI. -->
<meta-data <meta-data
android:name="io.flutter.embedding.android.NormalTheme" android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" android:resource="@style/NormalTheme" />
/>
<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" />
</intent-filter> </intent-filter>
</activity> </activity>
...@@ -53,11 +53,13 @@ ...@@ -53,11 +53,13 @@
<!-- 深度链接配置 --> <!-- 深度链接配置 -->
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.BROWSABLE" />
<data <data
android:scheme="clx" android:host="msl-detection-app"
android:host="msl-detection-app" /> <!-- 自己产品的productCode --> android:scheme="clx" /> <!-- 自己产品的productCode -->
</intent-filter> </intent-filter>
</activity> </activity>
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android">
package="com.clx.account_center_example">
<!-- The INTERNET permission is required for development. Specifically, <!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application the Flutter tool 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>
buildscript { buildscript {
ext.kotlin_version = '1.8.10' ext.kotlin_version = '1.8.20'
repositories { repositories {
google() google()
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.1.2' classpath 'com.android.tools.build:gradle:8.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
} }
} }
......
...@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -2,4 +2,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
差异被折叠。
...@@ -6,7 +6,7 @@ description: Demonstrates how to use the account_center plugin. ...@@ -6,7 +6,7 @@ description: Demonstrates how to use the account_center plugin.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev publish_to: 'none' # Remove this line if you wish to publish to pub.dev
environment: environment:
sdk: '>=2.18.2 <3.0.0' sdk: ">=2.17.0 <4.0.0"
# Dependencies specify other packages that your package needs in order to work. # Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions # To automatically upgrade your package dependencies to the latest versions
...@@ -29,16 +29,12 @@ dependencies: ...@@ -29,16 +29,12 @@ dependencies:
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2 cupertino_icons: ^1.0.2
uuid: ^4.2.2 uuid: ^4.5.1
flutter_clx_base:
git:
url: https://t.clxkj.cn/openSourceLibrary/flutter_clx_base.git
ref: v1.0.2
dependency_overrides: dependency_overrides:
package_info_plus: 3.1.2
ffi: 2.0.1
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
......
import 'dart:io'; import 'dart:io';
import 'package:device_info/device_info.dart'; import 'package:device_info_plus/device_info_plus.dart';
class DeviceInfo { class DeviceInfo {
String deviceId; String deviceId;
...@@ -29,7 +29,7 @@ class DeviceInfo { ...@@ -29,7 +29,7 @@ class DeviceInfo {
// 根据 Android 设备信息创建 DeviceInfo 对象 // 根据 Android 设备信息创建 DeviceInfo 对象
factory DeviceInfo.fromAndroidDeviceInfo(AndroidDeviceInfo androidInfo) { factory DeviceInfo.fromAndroidDeviceInfo(AndroidDeviceInfo androidInfo) {
return DeviceInfo( return DeviceInfo(
deviceId: androidInfo.androidId, deviceId: androidInfo.serialNumber,
deviceName: androidInfo.model, deviceName: androidInfo.model,
systemVersion: androidInfo.version.release, systemVersion: androidInfo.version.release,
brand: androidInfo.brand); brand: androidInfo.brand);
...@@ -38,7 +38,7 @@ class DeviceInfo { ...@@ -38,7 +38,7 @@ class DeviceInfo {
// 根据 iOS 设备信息创建 DeviceInfo 对象 // 根据 iOS 设备信息创建 DeviceInfo 对象
factory DeviceInfo.fromIosDeviceInfo(IosDeviceInfo iosInfo) { factory DeviceInfo.fromIosDeviceInfo(IosDeviceInfo iosInfo) {
return DeviceInfo( return DeviceInfo(
deviceId: iosInfo.identifierForVendor, deviceId: iosInfo.identifierForVendor ?? "",
deviceName: AppleDeviceModelMapper.getModelName(iosInfo.utsname.machine), deviceName: AppleDeviceModelMapper.getModelName(iosInfo.utsname.machine),
systemVersion: iosInfo.systemVersion, systemVersion: iosInfo.systemVersion,
); );
......
import 'package:account_center/account_center.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter_clx_base/flutter_clx_base.dart'; import 'package:getwidget/getwidget.dart';
class CodeVerifyButton extends StatefulWidget { class CodeVerifyButton extends StatefulWidget {
final String text; final String text;
......
import 'package:account_center/account_center.dart';
import 'package:account_center/style/style_params.dart'; import 'package:account_center/style/style_params.dart';
import 'package:account_center/widget/radio_check.dart'; import 'package:account_center/widget/radio_check.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:getwidget/getwidget.dart';
/// 风格化控件,处理统一风格,和颜色 /// 风格化控件,处理统一风格,和颜色
abstract class StyleWidget { abstract class StyleWidget {
......
...@@ -4,7 +4,7 @@ import 'dart:io'; ...@@ -4,7 +4,7 @@ import 'dart:io';
import 'package:account_center/widget/file_utils.dart'; import 'package:account_center/widget/file_utils.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_pdfview/flutter_pdfview.dart'; // import 'package:flutter_pdfview/flutter_pdfview.dart';
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
class PdfPreview extends StatefulWidget { class PdfPreview extends StatefulWidget {
...@@ -38,8 +38,8 @@ class _PdfPreviewState extends State<PdfPreview> { ...@@ -38,8 +38,8 @@ class _PdfPreviewState extends State<PdfPreview> {
return filePath == null return filePath == null
? const Center( ? const Center(
child: CircularProgressIndicator(), child: CircularProgressIndicator(),
) ):SizedBox();
: PDFView(filePath: filePath); // : PDFView(filePath: filePath);
} }
Future<File> createFileOfPdfUrl() async { Future<File> createFileOfPdfUrl() async {
......
...@@ -10,33 +10,34 @@ environment: ...@@ -10,33 +10,34 @@ environment:
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
device_info: ^2.0.0 device_info_plus: ^11.2.2
flutter_svg: ^2.0.6 flutter_svg: ^2.1.0
external_path: ^1.0.3 external_path: ^2.2.0
file_picker: ^5.3.1 file_picker: 10.3.2
url_launcher: ^6.1.2 url_launcher: ^6.3.1
# 打开文件 # 打开文件
open_filex: ^4.3.2 open_filex: ^4.7.0
flutter_widget_from_html_core: ^0.10.1 flutter_widget_from_html_core: ^0.16.1
open_store: ^0.5.0 open_store: ^0.5.0
connectivity_plus: ^5.0.2 connectivity_plus: ^6.1.5
flutter_pdfview: 1.4.0 # flutter_pdfview: 1.4.3
flutter_oss_aliyun: ^6.4.2 flutter_oss_aliyun: ^6.4.2
aliyun_face_plugin: aliyun_face_plugin:
git: git:
url: https://dev:devfortesting@t.clxkj.cn/openSourceLibrary/aliyun_face_plugin.git url: https://dev:devfortesting@t.clxkj.cn/openSourceLibrary/aliyun_face_plugin.git
ref: v1.0.4 ref: v1.0.4-flutter-3.24.5
flutter_clx_base:
git:
url: https://t.clxkj.cn/openSourceLibrary/flutter_clx_base.git
ref: v1.0.3_3.24.5
getwidget: ^7.0.0
dependency_overrides: dependency_overrides:
ffi: 2.0.1
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
flutter_lints: ^3.0.1 flutter_lints: ^3.0.1
flutter_clx_base:
git:
url: https://t.clxkj.cn/openSourceLibrary/flutter_clx_base.git
ref: v1.0.2
flutter: flutter:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论