简体   繁体   English

应用清单中的 URI 方案未正确设置错误

[英]URI scheme in your app's manifest is not set up correctly Error

I'm trying to upload a file to dropbox using my flutter mobile app.I get the below error when trying to upload the file to drop box.I'm using the dropbox_client package to access, upload and download a file from dropbox我正在尝试使用我的 flutter 移动应用程序将文件上传到保管箱。尝试将文件上传到保管箱时出现以下错误。我正在使用 dropbox_client package 从保管箱访问、上传和下载文件

E/MethodChannel#dropbox( 6383): Failed to handle method call
E/MethodChannel#dropbox( 6383): java.lang.IllegalStateException: URI scheme in your 
app's manifest is not set up correctly. You should have a 
com.dropbox.core.android.AuthActivity with the scheme: db-o9spra3j1p1cwgk
E/MethodChannel#dropbox( 6383):     at 
com.dropbox.core.android.AuthActivity.checkAppBeforeAuth(AuthActivity.java:353)
E/MethodChannel#dropbox( 6383):     at 
com.dropbox.core.android.Auth.startOAuth2Authentication(Auth.java:161)
E/MethodChannel#dropbox( 6383):     at 
com.dropbox.core.android.Auth.startOAuth2Authentication(Auth.java:147)
E/MethodChannel#dropbox( 6383):     at 
com.dropbox.core.android.Auth.startOAuth2Authentication(Auth.java:134)
E/MethodChannel#dropbox( 6383):     at 
com.dropbox.core.android.Auth.startOAuth2Authentication(Auth.java:32)
E/MethodChannel#dropbox( 6383):     at 
com.dropbox.core.android.Auth.startOAuth2Authentication(Auth.java:24)
E/MethodChannel#dropbox( 6383):     at 
com.mix1009.dropbox.DropboxPlugin.onMethodCall(DropboxPlugin.java:161)
E/MethodChannel#dropbox( 6383):     at 
E/MethodChannel#dropbox( 6383):     at 
io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
E/MethodChannel#dropbox( 6383):     at 
io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io- 
flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/MethodChannel#dropbox( 6383):     at 
io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown 
 Source:12)
 E/MethodChannel#dropbox( 6383):    at 
 android.os.Handler.handleCallback(Handler.java:938)
E/MethodChannel#dropbox( 6383):     at 
android.os.Handler.dispatchMessage(Handler.java:99)
E/MethodChannel#dropbox( 6383):     at android.os.Looper.loopOnce(Looper.java:201)
E/MethodChannel#dropbox( 6383):     at android.os.Looper.loop(Looper.java:288)
E/MethodChannel#dropbox( 6383):     at 
android.app.ActivityThread.main(ActivityThread.java:7870)
E/MethodChannel#dropbox( 6383):     at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#dropbox( 6383):     at 
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
E/MethodChannel#dropbox( 6383):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

E/flutter ( 6383): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: PlatformException(error, URI scheme in your app's manifest is not set up correctly. You should have a com.dropbox.core.android.AuthActivity with the scheme: db-o9spra3j1p1cwgk, null, java.lang.IllegalStateException: URI scheme in your app's manifest is not set up correctly. You should have a com.dropbox.core.android.AuthActivity with the scheme: db- o9spra3j1p1cwgk E/flutter ( 6383): at com.dropbox.core.android.AuthActivity.checkAppBeforeAuth(AuthActivity.java:353) E/flutter (6383): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] 未处理的异常:PlatformException(错误,您的应用清单中的 URI 方案设置不正确。您应该有一个 com.dropbox。 core.android.AuthActivity with the scheme: db-o9spra3j1p1cwgk, null, java.lang.IllegalStateException: URI scheme in your app's manifest is not set up correctly. You should have a com.dropbox.core.android.AuthActivity with the scheme: db- o9spra3j1p1cwgk E/flutter (6383): 在 com.dropbox.core.android.AuthActivity.checkAppBeforeAuth(AuthActivity.Z93F725A07423D11C486)

Below is my android manifest file下面是我的 android 清单文件

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.dropbox_test">
<application
    android:label="dropbox_test"
    android:name="${applicationName}"
    android:icon="@mipmap/ic_launcher">
    <activity
        android:name=".MainActivity"
        android:exported="true"
        android:launchMode="singleTop"
        android:theme="@style/LaunchTheme"
        android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
        android:hardwareAccelerated="true"
        android:windowSoftInputMode="adjustResize">
        <!-- Specifies an Android theme to apply to this Activity as soon as
             the Android process has started. This theme is visible to the user
             while the Flutter UI initializes. After that, this theme continues
             to determine the Window background behind the Flutter UI. -->
        <meta-data
          android:name="io.flutter.embedding.android.NormalTheme"
          android:resource="@style/NormalTheme"
          />
        <intent-filter>
            <data android:scheme="db-o9spra3j1p1cwgk" />
            <action android:name="android.intent.action.VIEW" />
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
    <!-- Don't delete the meta-data below.
         This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
    <meta-data
        android:name="flutterEmbedding"
        android:value="2" />
</application>

You don't seem to have the necessary URL scheme registered for "com.dropbox.core.android.AuthActivity" in particular.您似乎没有特别为“com.dropbox.core.android.AuthActivity”注册必要的 URL 方案。 You can find an example here:你可以在这里找到一个例子:

https://github.com/dropbox/dropbox-sdk-java/blob/master/examples/DropboxAndroid/app/src/main/AndroidManifest.xml https://github.com/dropbox/dropbox-sdk-java/blob/master/examples/DropboxAndroid/app/src/main/AndroidManifest.xml

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

相关问题 如何在 Flutter 应用中正确设置 redirect_uri? - How to correctly set redirect_uri in Flutter app? 无法从Flutter应用中正确打开网址方案 - Cannot open url scheme correctly from flutter app Flutter:您的应用程序的 AndroidManifest.xml 中的位置包错误元数据标记不存在 - Flutter : Location Package Error meta-data tag in your app's AndroidManifest.xml does not exist 正确编辑 android 清单 - Edit android manifest correctly 您的存储桶尚未为 Firebase 存储正确设置 - Your bucket has not been set up properly for Firebase Storage 应用安装错误:INSTALL_PARSE_FAILED_MANIFEST_MALFORMED - App installation error : INSTALL_PARSE_FAILED_MANIFEST_MALFORMED 如何在Flutter应用与其android / ios代码之间设置发布-订阅频道? - How to set up a publish-subscribe channel between a Flutter app and it's android/ios code? 颤振中 uri mongo_dart 中的无效方案 - Invalid scheme in uri mongo_dart in flutter 设置 flutter_localizations 时出错 package “URI 的目标不存在:‘package:flutter_gen/gen_l10n/app_localizations.dart’。” - Error setting-up flutter_localizations package "Target of URI doesn't exist: 'package:flutter_gen/gen_l10n/app_localizations.dart'." 在 Flutter 应用中保存 Stripe 的密钥 - Saving Stripe's secret key in your flutter app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM