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 flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' }
def flutterVersionName = localProperties.getProperty('flutter.versionName') if (flutterVersionName == null) { flutterVersionName = '1.0' }
apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.im"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
signingConfigs {
release {
keyAlias 'my-key-alias'
keyPassword 'li198022'
storeFile file("./my-release-key.keystore")
storePassword 'li198022'
}
}
buildTypes {
release {
// minifyEnabled false
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
//signingConfig signingConfigs.debug
signingConfig signingConfigs.release
}
}
}
flutter { source '../..' }
dependencies { implementation('cn.leancloud:realtime-android:6.5.12') { exclude group: 'cn.leancloud', module: 'realtime-core' } implementation('cn.leancloud:storage-android:6.5.12') { exclude group: 'cn.leancloud', module: 'realtime-core' } implementation 'cn.leancloud:realtime-core:6.5.12' implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:multidex:1.0.3'
}
740921760:
020-09-07 10:40:36.224 21250-21250/? W/adbd: timeout expired while flushing socket, closing 2020-09-07 10:40:36.359 31252-31252/? D/i: onMethodCall openClient, args:{r=false, clientId=Tom, signRegistry={sessionOpen=false, conversation=false}} 2020-09-07 10:40:36.359 31252-31252/? D/g: openClient... 2020-09-07 10:40:36.359 31252-31252/? D/k: add request cache. client=Tom, conv=null, request=-65533 2020-09-07 10:40:36.359 31252-31252/? E/e: session error:java.lang.IllegalStateException: Connection Lost 2020-09-07 10:40:36.359 31252-31252/? D/g: enter onOperationCompleted with clientId=Tom, convId=null, requestId=-65533, operation=CLIENT_OPEN 2020-09-07 10:40:36.359 31252-31252/? D/i: client open result: {clientId=Tom} 2020-09-07 10:40:36.360 31252-31321/? E/flutter: [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: LC.RTM.Exception( code: 0, essage: java.lang.IllegalStateException: Connection Lost, details: Connection Lost, ) #0 Utilities.call (package:leancloud official_plugin/src/client.dart:122) #1 Client.open (package:leancloud_official_plugin/src/client.dart:454) #2 MyHomePageState. incrementCounter (package:im/main.dart:59) 2020-09-07 10:40:36.429 10394-10686/? I/SmartThreadExecutor: handleMessage: start check 0 2020-09-07 10:40:36.429 10394-10686/? I/SmartThreadExecutor: handleMessage: check end 0 -83 false 2020-09-07 10:40:36.530 1059-1059/? D/Zygote: Forked child process 783
这是整个build文件