0

我需要你的帮助。我正在努力将 Scoreloop 与一个简单的 Android 应用程序(一种“Hello World”Android 应用程序)集成。我遵循了 Scoreloop 提供的 scoreloopUI 文档中描述的所有步骤。回顾一下:

  • 我在 Eclipse 中创建了一个简单的 Android 应用程序;
  • 我在 Eclipse 中导入了 scoreloopUI 项目;
  • 我去了我的简单项目的属性,并将 scoreloopUI 项目链接为库;
  • 我将scoreloop.properties文件添加到我的简单项目的 Assets 文件夹中;
  • 我更改了manifest.xml文件,添加了文档中描述的条目(“更新 Android 清单”部分);
  • 我改变了我的活动添加ScoreloopManagerSingleton.init(this, "whatever_your_game_secret_is");(显然我用我真正的秘密改变了“whatever_your_game_secret_is”)。

当我运行程序时发生异常:

Manifest file verification error. Please resolve any issues first!

有什么建议么?感谢你们对我的帮助!

编辑:这是我的清单文件

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.provascore"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="9" />
    <!-- Permission configuration required by Scoreloop -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.provascore.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>

        <!-- Defining the ScoreloopUI activities -->
        <activity
            android:name="com.scoreloop.client.android.ui.EntryScreenActivity"
            android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />
        <activity
            android:name="com.scoreloop.client.android.ui.ShowResultOverlayActivity"
            android:theme="@style/sl_dialog" />
        <activity android:name="com.scoreloop.client.android.ui.component.market.MarketHeaderActivity" />
        <activity android:name="com.scoreloop.client.android.ui.component.market.MarketListActivity" />
        <activity android:name="com.scoreloop.client.android.ui.component.entry.EntryListActivity" />
        <activity
            android:name="com.scoreloop.client.android.ui.component.post.PostOverlayActivity"
            android:theme="@style/sl_dialog" />
        <activity android:name="com.scoreloop.client.android.ui.component.score.ScoreHeaderActivity" />
        <activity android:name="com.scoreloop.client.android.ui.component.score.ScoreListActivity" />
        <activity android:name="com.scoreloop.client.android.ui.component.user.UserAddBuddyListActivity" />
        <activity android:name="com.scoreloop.client.android.ui.component.user.UserHeaderActivity" />
        <activity android:name="com.scoreloop.client.android.ui.component.user.UserDetailListActivity" />
        <activity android:name="com.scoreloop.client.android.ui.component.user.UserListActivity" />
        <activity android:name="com.scoreloop.client.android.ui.component.game.GameDetailHeaderActivity" />
        <activity android:name="com.scoreloop.client.android.ui.component.game.GameDetailListActivity" />
        <activity android:name="com.scoreloop.client.android.ui.component.game.GameListActivity" />
        <activity android:name="com.scoreloop.client.android.ui.component.profile.ProfileSettingsListActivity" />
        <activity android:name="com.scoreloop.client.android.ui.component.profile.ProfileSettingsPictureListActivity" />
        <activity
            android:name="com.scoreloop.client.android.ui.LeaderboardsScreenActivity"
            android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />
        <activity
            android:name="com.scoreloop.client.android.ui.framework.ScreenActivity"
            android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />
        <activity android:name="com.scoreloop.client.android.ui.framework.TabsActivity" />
    </application>

</manifest>

这是 scoreloopUI 项目清单文件:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.scoreloop.client.android.ui"
    android:versionCode="1"
    android:versionName="1.0">

    <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="17" />
    <application>

        <activity android:name="com.scoreloop.client.android.ui.EntryScreenActivity" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"/>
        <activity android:name="com.scoreloop.client.android.ui.PostScoreOverlayActivity" android:theme="@style/sl_dialog"/>
        <activity android:name="com.scoreloop.client.android.ui.ShowResultOverlayActivity" android:theme="@style/sl_dialog"/>
        <activity android:name="com.scoreloop.client.android.ui.BuddiesScreenActivity" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"/>
        <activity android:name="com.scoreloop.client.android.ui.LeaderboardsScreenActivity" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"/>
        <activity android:name="com.scoreloop.client.android.ui.ChallengesScreenActivity" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"/>
        <activity android:name="com.scoreloop.client.android.ui.AchievementsScreenActivity" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"/>
        <activity android:name="com.scoreloop.client.android.ui.SocialMarketScreenActivity" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"/>
        <activity android:name="com.scoreloop.client.android.ui.ProfileScreenActivity" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"/>
        <activity android:name="com.scoreloop.client.android.ui.GameItemPaymentScreenActivity" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"/>

        <activity android:name="com.scoreloop.client.android.ui.component.market.MarketHeaderActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.market.MarketListActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.entry.EntryListActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.post.PostOverlayActivity" android:theme="@style/sl_dialog"/>
        <activity android:name="com.scoreloop.client.android.ui.component.score.ScoreHeaderActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.score.ScoreListActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.user.UserAddBuddyListActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.user.UserHeaderActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.user.UserDetailListActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.user.UserListActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.game.GameDetailHeaderActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.game.GameDetailListActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.game.GameListActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.achievement.AchievementHeaderActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.achievement.AchievementListActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.news.NewsHeaderActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.news.NewsListActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.challenge.ChallengeHeaderActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.challenge.ChallengeListActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.challenge.ChallengeAcceptListActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.challenge.ChallengeCreateListActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.profile.ProfileSettingsListActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.profile.ProfileSettingsPictureListActivity"/>
        <activity android:name="com.scoreloop.client.android.ui.component.payment.PaymentMethodListActivity" android:configChanges="orientation|keyboard|keyboardHidden"/>
        <activity android:name="com.scoreloop.client.android.ui.component.payment.GameItemHeaderActivity"/>

        <activity android:name="com.scoreloop.client.android.ui.framework.ScreenActivity" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"/>
        <activity android:name="com.scoreloop.client.android.ui.framework.TabsActivity"/>

        <activity android:name="com.scoreloop.client.android.core.paymentprovider.ProxyActivity" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:configChanges="orientation|keyboard|keyboardHidden"/>

        <activity android:name="com.boku.mobile.android.PaymentPanelActivity" 
            android:label="Paymo Panel" 
            android:configChanges="keyboard|keyboardHidden|navigation|orientation"  
            android:theme="@style/BokuModal"/>

        <activity android:name="com.paypal.android.MEP.PayPalActivity" 
            android:theme="@android:style/Theme.Translucent.NoTitleBar" 
            android:configChanges="keyboardHidden|orientation"/>

        <activity android:name="com.zong.android.engine.web.ZongWebView" 
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
            android:screenOrientation="portrait">
            <intent-filter> <action android:name="com.zong.mobile.PAYMENT" /> <category android:name="android.intent.category.DEFAULT" />
            </intent-filter> 
        </activity>
        <provider android:name="com.zong.android.engine.provider.ZongPersistanceProvider" android:authorities="com.zong.provider.persistence"/>

    </application>

</manifest>
4

2 回答 2

0

我只是猜测。您是否检查了 scoreloopUI 项目的 isLibrary 选项。选择项目 scoreloopUI,右击,进入 Properties --> Android --> 在 android 菜单底部你会看到 isLibrary 选项打勾,这样你就可以在其他项目中将它作为 android library 项目

于 2013-10-17T13:37:00.947 回答
0

问题是在我的清单文件中没有一些条目:阅读 scoreloopUI 文档,您可以找到“更新 Android 清单”部分。本节提供了一些条目,但还不够!这些是提供的条目:

<!-- Defining the ScoreloopCore activities -->
 <activity android:name="com.scoreloop.client.android.core.ui.ProxyActivity" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:configChanges="orientation|keyboard|keyboardHidden|screenSize|smallestScreenSize"/>
 <!-- Note: you may need to add more entries here for the payment methods you want to use. -->

 <!-- Defining the ScoreloopUI activities -->
 <activity android:name="com.scoreloop.client.android.ui.EntryScreenActivity" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"/>
 <activity android:name="com.scoreloop.client.android.ui.ShowResultOverlayActivity" android:theme="@style/sl_dialog"/>

 <activity android:name="com.scoreloop.client.android.ui.component.market.MarketHeaderActivity"/>
 <activity android:name="com.scoreloop.client.android.ui.component.market.MarketListActivity"/>
 <activity android:name="com.scoreloop.client.android.ui.component.entry.EntryListActivity"/>
 <activity android:name="com.scoreloop.client.android.ui.component.post.PostOverlayActivity" android:theme="@style/sl_dialog"/>
 <activity android:name="com.scoreloop.client.android.ui.component.score.ScoreHeaderActivity"/>
 <activity android:name="com.scoreloop.client.android.ui.component.score.ScoreListActivity"/>
 <activity android:name="com.scoreloop.client.android.ui.component.user.UserAddBuddyListActivity"/>
 <activity android:name="com.scoreloop.client.android.ui.component.user.UserHeaderActivity"/>
 <activity android:name="com.scoreloop.client.android.ui.component.user.UserDetailListActivity"/>
 <activity android:name="com.scoreloop.client.android.ui.component.user.UserListActivity"/>
 <activity android:name="com.scoreloop.client.android.ui.component.game.GameDetailHeaderActivity"/>
 <activity android:name="com.scoreloop.client.android.ui.component.game.GameDetailListActivity"/>
 <activity android:name="com.scoreloop.client.android.ui.component.game.GameListActivity"/>
 <activity android:name="com.scoreloop.client.android.ui.component.profile.ProfileSettingsListActivity"/>
 <activity android:name="com.scoreloop.client.android.ui.component.profile.ProfileSettingsPictureListActivity"/>
 <activity android:name="com.scoreloop.client.android.ui.LeaderboardsScreenActivity" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"/>

 <activity android:name="com.scoreloop.client.android.ui.framework.ScreenActivity" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"/>
 <activity android:name="com.scoreloop.client.android.ui.framework.TabsActivity"/>

在网上搜索,我找到了这个scoreloop 类(StandardScoreloopManager)。在这个类的底部有一个检查用户清单文件的函数。一些必需的条目不在上面的文档中:

"com.scoreloop.client.android.ui.component.achievement.AchievementHeaderActivity"
"com.scoreloop.client.android.ui.component.achievement.AchievementListActivity"
"com.scoreloop.client.android.ui.component.news.NewsHeaderActivity"
"com.scoreloop.client.android.ui.component.news.NewsListActivity"
"com.scoreloop.client.android.ui.component.challenge.ChallengeHeaderActivity"
"com.scoreloop.client.android.ui.component.challenge.ChallengeListActivity"
"com.scoreloop.client.android.ui.component.challenge.ChallengeAcceptListActivity"
"com.scoreloop.client.android.ui.component.challenge.ChallengeCreateListActivity"
"com.scoreloop.client.android.ui.component.challenge.ChallengePaymentActivity"
"com.scoreloop.client.android.ui.BuddiesScreenActivity"
"com.scoreloop.client.android.ui.ChallengesScreenActivity"
"com.scoreloop.client.android.ui.AchievementsScreenActivity"
"com.scoreloop.client.android.ui.SocialMarketScreenActivity"
"com.scoreloop.client.android.ui.ProfileScreenActivity"

在清单文件中添加这些条目可以解决问题。感谢大家的帮助。

于 2013-10-22T09:57:35.693 回答