我正在使用Android游戏,当代码在我的Android设备中执行时,它显示“不幸的是,appname已停止工作”
这是logcat 06-27 17:29:08.254:D / AndroidRuntime(704):关闭VM 06-27 17:29:08.254:W / dalvikvm(704):threadid = 1:线程退出未捕获异常(group = 0x2ba041f8) 06-27 17:29:08.264:W / System.err(704):java.lang.RuntimeException:无法销毁活动{com.rookiegames.sher / com.rookiegames.sher.PlayActivity}:java.lang.IllegalArgumentException:服务未注册:com.rookiegames.sher.inappbilling.util.IabHelper$1@2c0c5198 06-27 17:29:08.264:W / System.err(704):在android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3112) 06-27 17:29:08.274:W / System.err(704):在android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3130) 06-27 17:29:08.274:W / System.err(704):在android.app.ActivityThread.access $ 1200(ActivityThread.java:123) 06-27 17:29:08.274:W / System.err(704):在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1180) 06-27 17:29:08.274:W / System.err(704):在android.os.Handler.dispatchMessage(Handler.java:99) 06-27 17:29:08.274:W / System.err(704):在android.os.Looper.loop(Looper.java:137) 06-27 17:29:08.274:W / System.err(704):在android.app.ActivityThread.main(ActivityThread.java:4424) 06-27 17:29:08.284:W / System.err(704):at java.lang.reflect.Method.invokeNative(Native Method) 06-27 17:29:08.284:W / System.err(704):at java.lang.reflect.Method.invoke(Method.java:511) 06-27 17:29:08.294:W / System.err(704):at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:784) 06-27 17:29:08.294:W / System.err(704):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 06-27 17:29:08.294:W / System.err(704):at dalvik.system.NativeStart.main(Native Method) 06-27 17:29:08.294:W / System.err(704):引起:java.lang.IllegalArgumentException:服务未注册:com.rookiegames.sher.inappbilling.util.IabHelper$1@2c0c5198 06-27 17:29:08.304:W / System.err(704):在android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:888) 06-27 17:29:08.304:W / System.err(704):在android.app.ContextImpl.unbindService(ContextImpl.java:1147) 06-27 17:29:08.304:W / System.err(704):在android.content.ContextWrapper.unbindService(ContextWrapper.java:375) 06-27 17:29:08.314:W / System.err(704):at com.rookiegames.sher.inappbilling.util.IabHelper.dispose(IabHelper.java:294) 06-27 17:29:08.314:W / System.err(704):at com.rookiegames.sher.PlayActivity.onDestroy(PlayActivity.java:243) 06-27 17:29:08.314:W / System.err(704):在android.app.Activity.performDestroy(Activity.java:4629) 06-27 17:29:08.314:W / System.err(704):在android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1079)
清单
package="com.rookiegames.sher"
android:installLocation="auto"
android:versionCode="6"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<!-- Store the DB on SD CARD -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!-- Use GP Billing -->
<uses-permission android:name="com.android.vending.BILLING" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoTitle" >
<activity
android:name="com.rookiegames.sher.StartActivity"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.millennialmedia.android.MMActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:configChanges="keyboardHidden|orientation|keyboard" ></activity>
<activity
android:name="com.rookiegames.sher.CategoriesActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/AppBaseTheme.NoTitle" >
</activity>
<activity
android:name="com.rookiegames.sher.LevelsActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/AppBaseTheme.NoTitle" >
</activity>
<activity
android:name="com.rookiegames.sher.WordsActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/AppBaseTheme.NoTitle" >
</activity>
<activity
android:name="com.rookiegames.sher.PlayActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="@style/AppBaseTheme.NoTitle" >
</activity>
<activity
android:name="com.tapjoy.TJCOffersWebView"
android:configChanges="keyboardHidden|orientation" />
<activity
android:name="com.tapjoy.TapjoyFullScreenAdWebView"
android:configChanges="keyboardHidden|orientation" />
<activity
android:name="com.tapjoy.TapjoyDailyRewardAdWebView"
android:configChanges="keyboardHidden|orientation" />
<activity
android:name="com.tapjoy.TapjoyVideoView"
android:configChanges="keyboardHidden|orientation" />
<activity android:name="net.hockeyapp.android.UpdateActivity" />
<activity
android:name="com.flurry.android.FlurryFullscreenTakeoverActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode">
答案 0 :(得分:0)
毫无疑问,没有密码?所以请问你究竟是什么问题,请发布一些相关的代码。但到目前为止我可以看到,这似乎是IabHelper类的一个问题:
Caused by: java.lang.IllegalArgumentException: Service not registered: com.rookiegames.sher.inappbilling.util.IabHelper$1@2c0c5198
这是关于此的另一篇文章。