Execution failed for task ':firebase_core:compileDebugJavaWithJavac' #3801
Unanswered
LeapingSwan
asked this question in
Q&A
Replies: 1 comment
-
Please note I have tried using flutter pub cache and then flutter clean. I have tracked this back to the following line of code (the fourth line here) in the Java plugin referred to: private Task<Map<String, Object>> firebaseAppToMap(FirebaseApp firebaseApp) {
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am having a problem creating a flutter Android build on Visual Studio. I am getting the following error:
Users/xxxxxxxxxxxx/.asdf/installs/flutter/1.12.13+hotfix.7-stable/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.5.0/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java:92: error: cannot find symbol
() -> {
^
symbol: method metafactory(Lookup,String,MethodType,MethodType,MethodHandle,MethodType)
location: interface LambdaMetafactory
Fatal Error: Unable to find method metafactory
FAILURE: Build failed with an exception.
Thanks for any help and my set up is as described below.
Flutter doctor shows the following:
xxxxxxxxx@xxxxxx-MBP bizbox % ~/.asdf/shims/flutter doctor -v
[✓] Flutter (Channel stable, 1.22.0, on Mac OS X 10.15.6 19G2021, locale en-GB)
• Flutter version 1.22.0 at /Users/stephenswan/.asdf/installs/flutter/1.12.13+hotfix.7-stable
• Framework revision d408d302e2 (8 days ago), 2020-09-29 11:49:17 -0700
• Engine revision 5babba6c4d
• Dart version 2.10.0
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/stephenswan/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.0.1, Build version 12A7300
• CocoaPods version 1.9.3
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 49.0.2
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] VS Code (version 1.49.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.15.0
[✓] Connected device (1 available)
• AOSP on IA Emulator (mobile) • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
! Error: xxxxxxxxxx’s iPhone is not connected. Xcode will continue when xxxxxxxxxx’s iPhone is connected.
(code -13)
• No issues found!
Dependencies in pub spec.ymal are as follows:
name: yyyyyyy
description: A new Flutter project.
version: 1.0.0+1
environment:
sdk: ">=2.6.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
permission_handler: 5.0.0+hotfix.10
cupertino_icons: ^0.1.2
pdf: ^1.11.1
path_provider: ^1.6.5
flutter_full_pdf_viewer: ^1.0.6
flutter_email_sender: ^3.0.1
firebase_auth: ^0.18.1+1
cloud_firestore: ^0.14.1+2
provider: ^4.3.2+2
flutter_spinkit: "^4.1.2"
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
- assets/
Gradle.properties are:
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
and app/build.gradle is
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 28
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
apply plugin: 'com.google.gms.google-services'
Beta Was this translation helpful? Give feedback.
All reactions