我当然是编程和扑动的新手。我正在尝试使用firebase pod来验证我的应用程序中的用户。 Android和它的“pubspec”就像一个魅力,但我不能让ios pod工作。每当我尝试使用其中一个已安装的pod时,我会收到以下错误:
MissingPluginException(找不到通道插件上的方法signInWithEmailAndPassword的实现插件.flutter.io / firebase_auth)
The 'podfile' and the 'podfile.lock' look like this:
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting
flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
pods_ary = []
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) { |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#
{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
pods_ary.push({:name => podname, :path => podpath});
else
puts "Invalid plugin specification: #{line}"
end
}
return pods_ary
end
target 'Runner' do
# Prepare symlinks folder. We use symlinks to avoid having
Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
# Flutter Pods
generated_xcode_build_settings =
parse_KV_file('./Flutter/Generated.xcconfig')
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. If you're running pod install
manually, make sure flutter packages get is executed first."
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('.symlinks', 'flutter')
File.symlink(File.dirname(p[:path]), symlink)
pod 'Flutter', :path => File.join(symlink,
File.basename(p[:path]))
end
}
# Plugin Pods
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('.symlinks', 'plugins', p[:name])
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
PODS:
- BoringSSL (10.0.3):
- BoringSSL/Implementation (= 10.0.3)
- BoringSSL/Interface (= 10.0.3)
- BoringSSL/Implementation (10.0.3):
- BoringSSL/Interface (= 10.0.3)
- BoringSSL/Interface (10.0.3)
- cloud_firestore (0.0.1):
- Firebase/Auth
- Firebase/Core
- Firebase/Database
- Firebase/Firestore
- Flutter
- Firebase/Auth (5.1.0):
- Firebase/CoreOnly
- FirebaseAuth (= 5.0.0)
- Firebase/Core (5.1.0):
- Firebase/CoreOnly
- FirebaseAnalytics (= 5.0.1)
- Firebase/CoreOnly (5.1.0):
- FirebaseCore (= 5.0.2)
- Firebase/Database (5.1.0):
- Firebase/CoreOnly
- FirebaseDatabase (= 5.0.1)
- Firebase/Firestore (5.1.0):
- Firebase/CoreOnly
- FirebaseFirestore (= 0.12.2)
- firebase_auth (0.0.1):
- Firebase/Auth
- Firebase/Core
- Flutter
- firebase_core (0.0.1):
- Firebase/Core
- Flutter
- firebase_database (0.0.1):
- Firebase/Database
- Flutter
- FirebaseAnalytics (5.0.1):
- FirebaseCore (~> 5.0)
- FirebaseInstanceID (~> 3.0)
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
- nanopb (~> 0.3)
- FirebaseAuth (5.0.0):
- FirebaseCore (~> 5.0)
- GTMSessionFetcher/Core (~> 1.1)
- FirebaseCore (5.0.2):
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
- FirebaseDatabase (5.0.1):
- FirebaseCore (~> 5.0)
- leveldb-library (~> 1.18)
- FirebaseFirestore (0.12.2):
- FirebaseCore (~> 5.0)
- FirebaseFirestore/abseil-cpp (= 0.12.2)
- gRPC-ProtoRPC (~> 1.0)
- leveldb-library (~> 1.18)
- Protobuf (~> 3.1)
- FirebaseFirestore/abseil-cpp (0.12.2):
- FirebaseCore (~> 5.0)
- gRPC-ProtoRPC (~> 1.0)
- leveldb-library (~> 1.18)
- Protobuf (~> 3.1)
- FirebaseInstanceID (3.0.0):
- FirebaseCore (~> 5.0)
- Flutter (1.0.0)
- GoogleToolboxForMac/Defines (2.1.4)
- "GoogleToolboxForMac/NSData+zlib (2.1.4)":
- GoogleToolboxForMac/Defines (= 2.1.4)
- gRPC (1.12.0):
- gRPC-RxLibrary (= 1.12.0)
- gRPC/Main (= 1.12.0)
- gRPC-Core (1.12.0):
- gRPC-Core/Implementation (= 1.12.0)
- gRPC-Core/Interface (= 1.12.0)
- gRPC-Core/Implementation (1.12.0):
- BoringSSL (~> 10.0)
- gRPC-Core/Interface (= 1.12.0)
- nanopb (~> 0.3)
- gRPC-Core/Interface (1.12.0)
- gRPC-ProtoRPC (1.12.0):
- gRPC (= 1.12.0)
- gRPC-RxLibrary (= 1.12.0)
- Protobuf (~> 3.0)
- gRPC-RxLibrary (1.12.0)
- gRPC/Main (1.12.0):
- gRPC-Core (= 1.12.0)
- gRPC-RxLibrary (= 1.12.0)
- GTMSessionFetcher/Core (1.1.15)
- leveldb-library (1.20)
- nanopb (0.3.8):
- nanopb/decode (= 0.3.8)
- nanopb/encode (= 0.3.8)
- nanopb/decode (0.3.8)
- nanopb/encode (0.3.8)
- Protobuf (3.5.0)
- url_launcher (0.0.1):
- Flutter
DEPENDENCIES:
- cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)
- firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_database (from `.symlinks/plugins/firebase_database/ios`)
- Flutter (from `.symlinks/flutter/ios`)
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
SPEC REPOS:
https://github.com/cocoapods/specs.git:
- BoringSSL
- Firebase
- FirebaseAnalytics
- FirebaseAuth
- FirebaseCore
- FirebaseDatabase
- FirebaseFirestore
- FirebaseInstanceID
- GoogleToolboxForMac
- gRPC
- gRPC-Core
- gRPC-ProtoRPC
- gRPC-RxLibrary
- GTMSessionFetcher
- leveldb-library
- nanopb
- Protobuf
EXTERNAL SOURCES:
cloud_firestore:
:path: ".symlinks/plugins/cloud_firestore/ios"
firebase_auth:
:path: ".symlinks/plugins/firebase_auth/ios"
firebase_core:
:path: ".symlinks/plugins/firebase_core/ios"
firebase_database:
:path: ".symlinks/plugins/firebase_database/ios"
Flutter:
:path: ".symlinks/flutter/ios"
url_launcher:
:path: ".symlinks/plugins/url_launcher/ios"
SPEC CHECKSUMS:
BoringSSL: c46efb47593135382bc0934196f16d2f726f5f36
cloud_firestore: a2d49d9c7219fce31033eb1a2ee953d7733c91d6
Firebase: e08fb0795f35707aeb1d8a715c731c45bdf6fd56
firebase_auth: 27a5a77a032d557c18f8e223aaf8ec1368f6cdbc
firebase_core: c96aa8b2fcf7f5167d32f22034f502f9304952b8
firebase_database: dd62ab9f71967c9011ce2fd03a89e762dcc364df
FirebaseAnalytics: b3628aea54c50464c32c393fb2ea032566e7ecc2
FirebaseAuth: acbeef02fe7c3a26624e309849f3fe30c84115af
FirebaseCore: b81044df1044c0857a0737c6324678b72d4f7f00
FirebaseDatabase: 482bad9c2abd422bb2321194fb8c937e67426a89
FirebaseFirestore: 93b8bf70484c92c271ae93940fe1e2ca9e35f92b
FirebaseInstanceID: 83e0040351565df711a5db3d8ebe5ea21aca998a
Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296
GoogleToolboxForMac: 91c824d21e85b31c2aae9bb011c5027c9b4e738f
gRPC: 9362451032695e2dfb7bafcd3740e3a27939e4ff
gRPC-Core: 9696b220565b283e021cf2722d473a4a74b7622a
gRPC-ProtoRPC: a1bd56fb1991a8dae4581250d7259eddabb66779
gRPC-RxLibrary: 1ed5314e8b38cd6e55c9bfa048387136ae925ce9
GTMSessionFetcher: 5fa5b80fd20e439ef5f545fb2cb3ca6c6714caa2
leveldb-library: 08cba283675b7ed2d99629a4bc5fd052cd2bb6a5
nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
Protobuf: 8a9838fba8dae3389230e1b7f8c104aa32389c03
url_launcher: 92b89c1029a0373879933c21642958c874539095
PODFILE CHECKSUM: 1e5af4103afd21ca5ead147d7b81d06f494f51a2
COCOAPODS: 1.5.3
Flutter Doctor:[✓] Flutter(频道测试版,v0.4.4,在Mac OS X 10.13.4上) 17E199,locale de-DE) •Flutter版本0.4.4 at / Users / jonasscholz / Entwicklung / flutter •框架修订版f9bb4289e9(3周前),2018-05-11 21:44:54 -0700 •发动机修订版06afdfe54e •Dart版本2.0.0-dev.54.0.flutter-46ab040e58
[!] Android工具链 - 针对Android设备开发(Android SDK 27.0.3) •位于/ Users / jonasscholz / Library / Android / sdk的Android SDK •未配置Android NDK位置(可选;对本机分析支持很有用) •平台android-27,构建工具27.0.3 •Java二进制文件:/ Applications / Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java •Java版OpenJDK运行时环境(版本1.8.0_152-release-1024-b01) !某些Android许可证未被接受。要解决此问题,请运行:flutter doctor --android-licenses
[✓] iOS工具链 - 针对iOS设备开发(Xcode 9.4) •Xcode位于/Applications/Xcode.app/Contents/Developer •Xcode 9.4,Build版本9F1027a •ios-deploy 1.9.2 •CocoaPods版本1.5.3
[✓] Android Studio(3.1版) •Android Studio / Applications / Android Studio.app/Contents •Flutter插件版本25.0.1 •Dart插件版本173.4700 •Java版OpenJDK运行时环境(版本1.8.0_152-release-1024-b01)
[✓]连接设备(2个可用) •为x86构建的Android SDK•emulator-5554•android-x86•Android 7.1.1(API 25)(模拟器) •Jonass iPhone•56aec322364a426af796f324c15095dd3df68883•ios•iOS 11.3
!医生发现了一类问题。
如果有人帮助我,我会很高兴的!
答案 0 :(得分:1)
首先尝试 flutter软件包获得 然后在 pods文件夹中打开终端。
执行命令pod安装或pod更新
然后打开 xcodeproject 文件并 clean 项目,然后构建
答案 1 :(得分:0)
你有: 1.在pubspec.yaml中包含firebase auth的依赖项,然后尝试“flutter packages get'和'颤动包升级' 2.更新您的xcode并安装可选工具
答案 2 :(得分:0)
尝试步骤:
打开终端然后cd到项目
flutter clean
flutter pub get
flutter build ios
cd ios
pod install --verbose
pod update