我正在 Macbook Air M1 2020 型号上使用 Arctic Fox 2020.3.1(ARM 版本 - 专为 Apple 芯片设计),运行 flutter 项目。我能够成功地在 Android 模拟器上运行,但是当我尝试在连接的 iOS 设备或 iOS 模拟器上运行时,“pod install”命令失败并且构建失败。但是当我在 Rosetta 2 上打开终端并尝试手动“pod install”时,它会安装所有 pod,之后我可以从 XCODE 运行构建,但不能从 Android Studio 运行构建,所以我的问题是:Android Studio 内的终端是否运行在Apple上(而不是在rosetta 2上)这就是它失败的原因。
\n注意:我已经更改了终端的配置以在rosetta 2上强制运行它。
\n\n当我尝试从 studio 运行 ios 时会发生这种情况
\nThe plugins `flutter_full_pdf_viewer, flutter_webview_plugin, onesignal_flutter` use a deprecated version of the Android embedding.\nTo avoid unexpected runtime failures, or future build failures, try to see if these plugins support the Android V2 embedding. …Run Code Online (Sandbox Code Playgroud) 我在我的应用程序中实现了MediaBrowserServiceCompat服务.
@Override
public BrowserRoot onGetRoot(@NonNull String s, int i, @Nullable Bundle bundle) {
Log.e("testing","onGetRoot");
return new BrowserRoot(MEDIA_ID_ROOT, null);
}
Run Code Online (Sandbox Code Playgroud)
MediaBrowserServiceCompat当我在手机中打开Android自动应用程序时,应用程序正在输入方法,但该方法onGetRoot永远不会被调用.所以我无法加载我的音乐文件夹.
我正在使用本机反应。深度链接非常适合 ios。但是,对于 Android,我似乎无法弄清楚如何从深层链接正确打开我的应用程序。
从 Firefox 打开深层链接时,我的应用程序在 Firefox 窗口内启动。当我使用深层链接测试器应用程序时也是如此。除了不是从正确的应用程序启动之外,一切都按预期与应用程序一起工作。
我究竟做错了什么?这是我的 AndroidManifest.xml 的摘录:
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges=
"keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="myapp" />
</intent-filter>
</activity>
Run Code Online (Sandbox Code Playgroud) android ×2
android-auto ×1
auto ×1
deep-linking ×1
flutter ×1
react-native ×1
rosetta-2 ×1
terminal ×1