You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't build my Flutter app for Android after adding the secure_application package, it crashes with error below:
Build file '/usr/local/Caskroom/flutter/2.2.2/flutter/.pub-cache/hosted/pub.dartlang.org/secure_application-3.7.3/android/build.gradle' line: 27
A problem occurred evaluating project ':secure_application'.
> No signature of method: build_c5ahy1849z3l6msywlxga8k28.android() is applicable for argument types: (build_c5ahy1849z3l6msywlxga8k28$_run_closure2) values: [build_c5ahy1849z3l6msywlxga8k28$_run_closure2@62470d9]
Here is my build.gradle of app module:
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 plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 30
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.mobile"
minSdkVersion 24
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
// 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
}
}
buildToolsVersion '30.0.3'
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
Hello!
I can't build my Flutter app for Android after adding the
secure_application
package, it crashes with error below:Here is my build.gradle of app module:
build.gradle of project:
And pubspec.yaml of Flutter:
What am I doing wrong? Where can the problem be?
The text was updated successfully, but these errors were encountered: