Closed 2534290808 closed 4 years ago
My environment is
`[✓] Flutter (Channel stable, v1.7.8+hotfix.4, on Mac OS X 10.14.6 18G95, locale
zh-Hans-CN)
• Flutter version 1.7.8+hotfix.4 at /Users/makisu/development/flutter
• Framework revision 20e59316b8 (4 months ago), 2019-07-18 20:04:33 -0700
• Engine revision fee001c93f
• Dart version 2.4.0
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/makisu/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling
support)
• Platform android-29, build-tools 29.0.2
• ANDROID_HOME = /Users/makisu/Library/Android/sdk
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_202-release-1483-b49-5587405)
! Some Android licenses not accepted. To resolve this, run: flutter doctor
--android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.0, Build version 11A420a
• CocoaPods version 1.8.4`
Can you please share your pubspec.yaml
and Podfile
?
pubspec.yaml
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 3.0.9+3000009
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
flutter_cache_manager: ^1.1.1
uuid: ^2.0.0
palette_generator: ^0.1.0
flutter_webview_plugin:
git: https://github.com/fluttercommunity/flutter_webview_plugin.git
webview_flutter: ^0.3.3+1
video_player: ^0.10.0+2
camera: ^0.5.2+1
# 用来模拟网络返回的数据,这些数据是真实的,这里模拟
dio: ^2.1.0
fluttertoast: ^3.0.4
event_bus: ^1.1.0
# 缓存
shared_preferences: ^0.4.0
jpush_flutter: 0.1.0
device_info: ^0.4.0+2
connectivity: ^0.4.2
# status bar
flutter_statusbar: ^0.0.1
# 适配
flutter_screenutil: ^0.5.2
#
flutter_spinkit: ^3.1.0
crypto: ^2.0.6
intl: ^0.15.8
xml: ^3.4.1
html: ^0.14.0+2
image_picker: ^0.6.0+17
# 图片信息
exif: ^1.0.1
# 图片处理
flutter_image_compress: ^0.6.3
# 视频处理
flutter_video_compress: ^0.3.7+8
fluro: ^1.5.1
#数据流管理框架
provider: ^3.1.0
rxdart: ^0.22.1
file_picker: ^1.3.8
permission_handler: ^3.2.0
flutter_sound: 1.4.7
fluwx: ^1.0.4
fake_weibo: 0.2.3
flutter_swiper: ^1.1.6
fake_tencent: 0.3.3
image_saver: ^1.0.0
cached_network_image: 1.1.1
clippy_flutter: ^1.1.0
qr_flutter: ^2.1.0
json_annotation: ^2.0.0
flutter_easyrefresh: ^2.0.4
flutter_i18n: ^0.6.4
audioplayers: ^0.13.1
flutter_html: ^0.11.0
hive: ^0.4.1+1
# 0.9.8会导致flutter版本没有升级到最新版报错
chewie: 0.9.7
common_utils: ^1.1.3
flutter_ffmpeg: ^0.2.7
flutter_icons: ^0.3.1
flutter_slidable: "^0.5.3"
image_cropper: 1.0.2
# 瀑布流
flutter_staggered_grid_view: ^0.3.0
animated_interpolation: ^0.3.2
flutter_picker: ^1.0.15
flutter_offline: ^0.2.4
shimmer: ^1.0.1
uni_links: ^0.2.0
package_info: ^0.4.0+6
url_launcher: ^5.1.4
device_apps: ^1.0.8
android_intent: ^0.3.3+2
photo_view: ^0.8.0
dev_dependencies:
flutter_test:
sdk: flutter
build_runner: ^1.0.0
json_serializable: ^2.0.0
Podfile
# Uncomment this line to define a global platform for your project
platform :ios, '9.3'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
pod 'Regift'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
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
# use_frameworks!
# 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')
if p[:name] == 'flutter_ffmpeg'
pod p[:name]+'/audio-lts', :path => File.join(symlink, 'ios')
else
pod p[:name], :path => File.join(symlink, 'ios')
end
}
end
pre_install do |installer|
installer.analysis_result.specifications.each do |s|
if s.name == 'Regift'
s.swift_version = '4.0'
end
end
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
Your Podfile
has an old format and something inside is causing mobile-ffmpeg
library to be installed twice.
pod install
Analyzing dependencies
Downloading dependencies
Installing Flutter (1.0.0)
Installing Regift (1.5.0)
Installing flutter_ffmpeg (0.2.8)
Installing mobile-ffmpeg-audio (4.2.2.LTS)
Installing mobile-ffmpeg-https (4.3)
Can you update it using Podfile of our example
app?
I will give it a try
I have solved this problem using Podfile in your example, thank you very much 😄 👍
This error
[!] The 'Pods-Runner' target has frameworks with conflicting names: mobileffmpeg.framework, libavcodec.framework, libavdevice.framework, libavfilter.framework, libavformat.framework, libavutil.framework, libswresample.framework, libswscale.framework, libcharset.framework, and libiconv.framework.
occurred when I ranpod update --verbose --no-rep-update