我需要你的帮助。 我正在努力将Scoreloop与一个简单的Android应用程序(一种“Hello World”Android应用程序)集成在一起。我按照Scoreloop提供的scoreloopUI文档中描述的所有步骤进行操作。回顾一下:
scoreloop.properties
文件添加到我的简单项目的Assets文件夹中; manifest.xml
文件,添加了文档中描述的条目(“更新Android Manifest”部分); 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>
答案 0 :(得分:0)
我只是在猜测。你为scoreloopUI项目检查了isLibrary选项吗? 选择项目scoreloopUI,右键单击,转到属性 - &gt; Android - &gt;在android菜单的底部你会看到isLibrary选项勾选,这样你就可以将它作为其他项目中的android库项目
答案 1 :(得分: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 class(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"
在清单文件中添加这些条目可以解决问题。感谢大家的帮助。