10分钟上手Flipper:移动端开发者必备调试工具安装指南
Flipper是一款专为移动开发者打造的桌面调试平台,能够帮助开发者可视化、检查和控制移动应用。本文将详细介绍如何在10分钟内完成Flipper的安装与基础配置,让你快速上手这款强大的调试工具。
Flipper简介
Flipper由两部分组成:桌面应用和移动SDK。它支持Android、iOS、Web应用等多种开发环境,能够与模拟器、真机设备无缝连接,提供日志查看、布局检查、网络监控等实用功能。
官方文档:docs/getting-started/index.mdx
系统要求
在开始安装前,请确保你的开发环境满足以下要求:
- node >= 18
- yarn >= 1.16
- iOS开发者工具(如开发iOS插件)
- Android SDK和adb
- OpenSSL(Windows用户需额外安装)
社区教程:README.md
安装Flipper桌面应用
快速安装(推荐)
对于macOS用户,可以通过Homebrew快速安装:
brew install --cask flipper
其他平台用户可以直接下载最新构建版本:
- Mac
- Linux
- Windows
从源码构建
如果你需要最新开发版本,可以从源码构建Flipper:
git clone https://gitcode.com/gh_mirrors/fli/flipper
cd flipper/desktop
yarn
yarn start
构建独立应用:
yarn build --mac # 或 --win, --linux
构建产物将保存在dist/目录下。
桌面应用源码:desktop/
配置Android应用
添加依赖
在你的build.gradle文件中添加以下依赖:
repositories {
mavenCentral()
}
dependencies {
debugImplementation 'com.facebook.flipper:flipper:0.273.0'
debugImplementation 'com.facebook.soloader:soloader:0.10.5'
releaseImplementation 'com.facebook.flipper:flipper-noop:0.273.0'
}
初始化Flipper
在Application类中初始化Flipper:
import com.facebook.flipper.android.AndroidFlipperClient
import com.facebook.flipper.android.utils.FlipperUtils
import com.facebook.flipper.core.FlipperClient
import com.facebook.flipper.plugins.inspector.DescriptorMapping
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin
class MyApplication : Application {
override fun onCreate() {
super.onCreate()
SoLoader.init(this, false)
if (BuildConfig.DEBUG && FlipperUtils.shouldEnableFlipper(this)) {
val client = AndroidFlipperClient.getInstance(this)
client.addPlugin(InspectorFlipperPlugin(this, DescriptorMapping.withDefaults()))
client.start()
}
}
}
Android SDK源码:android/ 详细配置指南:docs/getting-started/android-native.mdx
配置iOS应用
CocoaPods配置
在你的Podfile中添加以下内容:
project 'MyApp.xcodeproj'
flipperkit_version = '0.250.0'
target 'MyApp' do
platform :ios, '10.0'
pod 'FlipperKit', '~>' + flipperkit_version, :configuration => 'Debug'
pod 'FlipperKit/FlipperKitLayoutComponentKitSupport', '~>' + flipperkit_version, :configuration => 'Debug'
pod 'FlipperKit/SKIOSNetworkPlugin', '~>' + flipperkit_version, :configuration => 'Debug'
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', '~>' + flipperkit_version, :configuration => 'Debug'
pod 'Flipper-DoubleConversion', :configuration => 'Debug'
pod 'Flipper-Folly', :configuration => 'Debug'
pod 'Flipper-Glog', :configuration => 'Debug'
pod 'Flipper-PeerTalk', :configuration => 'Debug'
pod 'CocoaLibEvent', :configuration => 'Debug'
pod 'boost-for-react-native', :configuration => 'Debug'
pod 'OpenSSL-Universal', :configuration => 'Debug'
pod 'CocoaAsyncSocket', :configuration => 'Debug'
end
初始化Flipper
在AppDelegate中初始化Flipper:
import UIKit
import FlipperKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let client = FlipperClient.shared()
let layoutDescriptorMapper = SKDescriptorMapper(defaults: ())
FlipperKitLayoutComponentKitSupport.setUpWith(layoutDescriptorMapper)
client?.add(FlipperKitLayoutPlugin(rootNode: application, with: layoutDescriptorMapper!))
client?.start()
return true
}
}
iOS SDK源码:iOS/ 详细配置指南:docs/getting-started/ios-native.mdx
启动与使用
完成上述配置后,启动Flipper桌面应用,然后运行你的移动应用。Flipper会自动检测并连接设备,你可以在界面中看到设备日志和已启用的插件。
浏览器版Flipper(实验性)
你还可以通过以下命令运行浏览器版Flipper:
npx flipper-server
常见问题解决
如果遇到连接问题,可以添加诊断Activity到AndroidManifest:
<activity android:name="com.facebook.flipper.android.diagnostics.FlipperDiagnosticActivity"
android:exported="true"/>
故障排除指南:docs/getting-started/troubleshooting/troubleshooting.mdx
总结
通过本文的指南,你已经成功安装并配置了Flipper调试工具。Flipper提供了丰富的插件生态系统,可以根据需要扩展其功能。开始探索Flipper的强大功能,提升你的移动开发效率吧!
插件开发指南:docs/extending/create-plugin.mdx
Kimi-K2.5Kimi K2.5 是一款开源的原生多模态智能体模型,它在 Kimi-K2-Base 的基础上,通过对约 15 万亿混合视觉和文本 tokens 进行持续预训练构建而成。该模型将视觉与语言理解、高级智能体能力、即时模式与思考模式,以及对话式与智能体范式无缝融合。Python00- QQwen3-Coder-Next2026年2月4日,正式发布的Qwen3-Coder-Next,一款专为编码智能体和本地开发场景设计的开源语言模型。Python00
xw-cli实现国产算力大模型零门槛部署,一键跑通 Qwen、GLM-4.7、Minimax-2.1、DeepSeek-OCR 等模型Go06
PaddleOCR-VL-1.5PaddleOCR-VL-1.5 是 PaddleOCR-VL 的新一代进阶模型,在 OmniDocBench v1.5 上实现了 94.5% 的全新 state-of-the-art 准确率。 为了严格评估模型在真实物理畸变下的鲁棒性——包括扫描伪影、倾斜、扭曲、屏幕拍摄和光照变化——我们提出了 Real5-OmniDocBench 基准测试集。实验结果表明,该增强模型在新构建的基准测试集上达到了 SOTA 性能。此外,我们通过整合印章识别和文本检测识别(text spotting)任务扩展了模型的能力,同时保持 0.9B 的超紧凑 VLM 规模,具备高效率特性。Python00
KuiklyUI基于KMP技术的高性能、全平台开发框架,具备统一代码库、极致易用性和动态灵活性。 Provide a high-performance, full-platform development framework with unified codebase, ultimate ease of use, and dynamic flexibility. 注意:本仓库为Github仓库镜像,PR或Issue请移步至Github发起,感谢支持!Kotlin08
VLOOKVLOOK™ 是优雅好用的 Typora/Markdown 主题包和增强插件。 VLOOK™ is an elegant and practical THEME PACKAGE × ENHANCEMENT PLUGIN for Typora/Markdown.Less00
