首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Azure Mobile Apps android 3.3登录流程,eclipse

Azure Mobile Apps android 3.3登录流程,eclipse
EN

Stack Overflow用户
提问于 2017-05-12 01:07:42
回答 1查看 104关注 0票数 0

我正在尝试更新我的android应用程序,以使用从此处下载的适用于android的azure移动应用程序sdk 3.3版。

https://github.com/Azure/azure-mobile-apps-android-client

为了消除复杂性,我在这里创建了一个基于microsoft文档的新项目

https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-android-get-started-users

我将.jar文件放在项目的libs目录中。当我尝试运行该项目时,我得到了一个unable to find explicit类的错误,这个类是.authentication.CustomTabsIntermidiateActivity.类

然后,我尝试以多种不同的方式在我的清单中声明此活动,但我仍然收到此错误。

然后,我下载了主文件,并尝试将其导入eclipse并将其设置为库,但得到了相同的错误。缺少的值存在于主文件的清单中。

我应该如何继续?

我的清单

代码语言:javascript
复制
    <?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,但我有一些应用程序正在使用这个流程,现在不想迁移所有的应用程序。

EN

回答 1

Stack Overflow用户

发布于 2017-05-23 17:03:57

根据您的AndroidManifest.xml内容,根据我的经验,我认为问题是由属于包com.microsoft.windowsazure.mobileservices.authentication.RedirectUrlActivity活动类引起的,而不是您定义的包com.example.pleasework。所以请不要在这里使用短的类名。

请尝试替换AndroidManifest.xml文件中的以下内容

代码语言:javascript
复制
<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>

用正确的那个。

代码语言:javascript
复制
<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>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43921729

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档