You should have a com.dropbox.client2.android.AuthActivity with the scheme:XXXXXXXX

后端 未结 2 1682
一整个雨季
一整个雨季 2021-01-06 16:53

I am trying to upload a text file to my Dropbox, but it shows an error in manifest. This is my Manifest file and the logcat error, what am

相关标签:
2条回答
  • 2021-01-06 17:05

    because you are missing to add activity,,,

     <activity
            android:name="com.example.ondropbox.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
    
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.dropbox.client2.android.AuthActivity"
            android:configChanges="orientation|keyboard"
            android:launchMode="singleTask" >
            <intent-filter>
                <data android:scheme="db-5qiq4z06ikagxfb" />
    
                <action android:name="android.intent.action.VIEW" />
    
                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
    

    and you are done.

    0 讨论(0)
  • 2021-01-06 17:07

    I had a very similar issue after migrating my app from Dropbox API v1 to v2. I used an official tutorial for migration - https://www.dropbox.com/developers/reference/migration-guide, but there are no word about Android, only basic examples in Java. So I opened this GitHub repo and used it as reference - https://github.com/dropbox/dropbox-sdk-java/tree/master/examples/android.

    But in new API they changed a package of AuthActivity and I forgot to check, so had a Runtime crash - Unable to find com.dropbox.core.android.AuthActivity.

    The solution is to change old package to new one - com.dropbox.client2.android.AuthActivity to com.dropbox.core.android.AuthActivity.

    0 讨论(0)
提交回复
热议问题