简体   繁体   English

如何判断一个 App 是原生的还是 Flutter 的

[英]How to determine if an app is native or flutter

I would like to know whether a given mobile app is native or written using flutter.我想知道给定的移动应用程序是原生的还是使用 flutter 编写的。 Is there any way to know that from the build files (apk, ipa.. etc).有什么方法可以从构建文件(apk、ipa 等)中知道这一点。 How can I detect if an app is native or flutter?如何检测应用是原生应用还是 Flutter 应用?

Upload the apk file on http://www.javadecompilers.com/apk上传http上的apk文件://www.javadecompilers.com/apk

If you find a folder flutter in sources so this app is a flutter app如果您在源中找到文件夹 flutter,则此应用程序是 flutter 应用程序

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

One can check from the phone by enabling layout bounds.可以通过启用布局边界从手机进行检查。 If the app show bounds around all component then it might be developed with native android or react native.如果应用程序显示所有组件的边界,那么它可能是使用原生 android 或 react native 开发的。 Still, in the case of flutter, it directly accesses canvas from the native side and paints on it, so it will not show any bounds around the components due to the direct use of canvas.尽管如此,在flutter的情况下,它直接从native端访问canvas并在上面绘制,因此不会因为直接使用canvas而显示组件周围的任何边界。

Here is SS of the app made with Flutter and native or other frame work which uses the native component.这是使用 Flutter 和原生或其他使用原生组件的框架工作制作的应用程序的 SS。

Flutter
Native Component原生组件
. .

You can find whether an app is using flutter or not by using the following method,您可以使用以下方法查看应用程序是否正在使用 flutter,

  1. Extract the apk file.解压apk文件。 You can simply rename the file extension to.zip and extract it.您只需将文件扩展名重命名为 .zip 并解压即可。
  2. Navigate to the lib folder.导航到 lib 文件夹。
  3. You will find a list of subfolders for different architectures.您将找到不同架构的子文件夹列表。
  4. The subfolder will contain a libflutter.so file.该子文件夹将包含一个libflutter.so文件。 This libflutter.so will be present in all flutter apps.这个libflutter.so将出现在所有 flutter 应用程序中。

Here is a screenshot of the file from the Flutter Gallery app .这是来自Flutter Gallery 应用程序的文件的屏幕截图。

在此处输入图像描述

Of course, you can find out by extracting the APK.当然,你可以通过解压APK找到。 But there is another simple way:但还有另一种简单的方法:

Install the app on your device, then open it and check list or grid in the UI .在您的设备上安装应用程序,然后打开它并在UI中检查列表或网格。

If you feel that when you scroll with two fingers, the speed doubles, and when you scroll with one finger, then the application is developed in Flutter.如果你觉得用两根手指滚动时,速度翻倍,而用一根手指滚动时,那么应用是用Flutter开发的。

Simple solution:简单的解决方案:

  1. Activation of the tile:激活瓷砖:
  • Developer Options ON开发人员选项开启
  • Quick settings developer tiles快速设置开发者磁贴
  • Show layout bounds显示布局边界
  1. Open app, swipe down from the top of the screen and touch icon layout to enable show layout bound.打开应用程序,从屏幕顶部向下滑动并触摸图标布局以启用显示布局绑定。

  2. Flutter app won't show small pieces layout of UI but Native app does. Flutter 应用程序不会显示 UI 的小块布局,但本机应用程序会显示。

  1. download and decode apk with apktool使用 apktool 下载和解码 apk
java -jar apktool.*.jar d file.apk -o output
  1. open up AndroidManifest.xml in a text editor在文本编辑器中打开 AndroidManifest.xml

  2. search for occurrences of flutter within the file在文件中搜索出现的 flutter

if using vim, at the terminal prompt,如果使用 vim,在终端提示符下,

vim +/flutter +"set hlsearch" AndroidManifest.xml

such occurrences could be flutter plugins and 'flutterEmbedding' which is responsible for integrating flutter within an Android app.此类事件可能是 flutter 插件和“flutterEmbedding”,它负责将 flutter 集成到 Android 应用程序中。

We can do the Finger-scroll test.我们可以进行手指滚动测试。

Start by scrolling the app with one finger, then use two fingers.首先用一根手指滚动应用程序,然后使用两根手指。 Make sure you are scrolling at the same pace.确保您以相同的速度滚动。 If the speed of the scroll increases with every finger you add, then it's built using Flutter.如果滚动速度随着您添加的每根手指而增加,那么它是使用 Flutter 构建的。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将原生 android 屏幕添加到 flutter 应用程序? - How to add native android screen to flutter app? 如何用 Flutter 应用替换现有的原生 Android/iOS 应用? - How to replace existing native Android/iOS app with Flutter app? Flutter:如何将原生 SDK(Spotify Android SDK)添加到应用程序? - Flutter: How to add a native SDK (Spotify Android SDK) to an app? 如何将数据从本机应用程序传递到 flutter? - how do I pass data from native app to flutter? flutter 无法确定依赖项 ':app:compileDebugJavaWithJavac' - flutter Could not determine the dependencies ':app:compileDebugJavaWithJavac' 无法确定任务 ':app:compileDebugJavaWithJavac' Flutter 的依赖关系 - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' Flutter 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系。[Flutter] - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.[Flutter] 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系 - Flutter - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' - Flutter 我们如何在flutter中获取StatefulWidget的生命周期? 我想确定当前屏幕上小部件的生命周期而不是完整的应用程序 - How Can we get the lifecycle of StatefulWidget in flutter? I want to determine the lifecycle of widget on current screen not of complete app 如何打开本机Facebook应用程序并确定用户应该/可以发布的文本 - How to open native Facebook app and determine the text a user should/could post
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM