我正在尝试更新我的android应用程序,以使用从此处下载的适用于android的azure移动应用程序sdk 3.3版。
https://github.com/Azure/azure-mobile-apps-android-client
为了消除复杂性,我在这里创建了一个基于microsoft文档的新项目
我将.jar文件放在项目的libs目录中。当我尝试运行该项目时,我得到了一个unable to find explicit类的错误,这个类是.authentication.CustomTabsIntermidiateActivity.类
然后,我尝试以多种不同的方式在我的清单中声明此活动,但我仍然收到此错误。
然后,我下载了主文件,并尝试将其导入eclipse并将其设置为库,但得到了相同的错误。缺少的值存在于主文件的清单中。
我应该如何继续?
我的清单
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.pleasework"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="19"
android:targetSdkVersion="22" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".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=".authentication.RedirectUrlActivity" 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="https://myservice.azure-mobile.net/"
android:host="easyauth.callback"/>
</intent-filter>
</activity>
<activity android:name="com.example.pleasework.com.microsoft.mobileservices.authentication.CustomTabsIntermediateActivity" android:exported="true">
</activity>
</application>
</manifest>我已经尝试过使用和不使用最终活动声明,还尝试了com.microsoft.mobileservices.authentication.CustomTabsIntermediateActivity的各种排列
无论清单中的值是什么,我仍然会收到错误
我意识到建议的解决方案是迁移到android studio,但我有一些应用程序正在使用这个流程,现在不想迁移所有的应用程序。
发布于 2017-05-23 17:03:57
根据您的AndroidManifest.xml内容,根据我的经验,我认为问题是由属于包com.microsoft.windowsazure.mobileservices的.authentication.RedirectUrlActivity活动类引起的,而不是您定义的包com.example.pleasework。所以请不要在这里使用短的类名。
请尝试替换AndroidManifest.xml文件中的以下内容
<activity android:name=".authentication.RedirectUrlActivity" 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="https://myservice.azure-mobile.net/"
android:host="easyauth.callback"/>
</intent-filter>
</activity>
<activity android:name="com.example.pleasework.com.microsoft.mobileservices.authentication.CustomTabsIntermediateActivity" android:exported="true">
</activity>用正确的那个。
<activity android:name="com.microsoft.windowsazure.mobileservices.authentication.RedirectUrlActivity">
<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="{url_scheme_of_your_app}"
android:host="easyauth.callback"/>
</intent-filter>
</activity>https://stackoverflow.com/questions/43921729
复制相似问题