amc*_*mcc 6 android dropbox android-manifest
我在getSession().startAuthentication()为Android Dropbox SDK 打电话时遇到此错误的任何想法?
: FATAL EXCEPTION: main
: java.lang.IllegalStateException: URI scheme in your app's manifest is not set up correctly. You should have a com.dropbox.client2.android.AuthActivity with the scheme: db-CHANGE_ME
Run Code Online (Sandbox Code Playgroud)
然而,我的AndroidManifest.xml <Application></Application>在入门说明中按照指示进行了以下操作.
<activity
android:name="com.dropbox.client2.android.AuthActivity"
android:launchMode="singleTask"
android:configChanges="orientation|keyboard">
<intent-filter>
<!-- Change this to be db- followed by your app key -->
<data android:scheme="db-MYKEYISHERE" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Run Code Online (Sandbox Code Playgroud)
如果您实际看到"db-CHANGE_ME"(即,这不是您用来模糊应用密钥的占位符),则表示您尚未更新应用Java代码中的应用密钥.该错误消息输出Java代码中提供的密钥,并期望它与清单中的密钥匹配.
您的干净构建可能已经选择了以前没有构建的Java更改.
对于那些面临这个问题的人,如果你像我一样,你可能不会注意一些细节,看看你的清单:
<intent-filter>
<data android:scheme="db-APP_KEY" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Run Code Online (Sandbox Code Playgroud)
你不应该db-APP_KEY用你的app键替换整个字符串,你应该离开db-那里,db-{HERE YOUR APP KEY}我知道我知道,我花了一段时间来弄清楚这一点.
例:
<intent-filter>
<data android:scheme="db-hafsa324dasd" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2580 次 |
| 最近记录: |