2013-05-07 93 views
0

我用Xamarin试用版创建了一个简单的应用程序,它只显示一个启动画面。当我在Xamarin工作室中点击“运行”后,它部署并运行得很好,但是如果我在设备上单击“Home”并尝试从应用程序列表中运行应用程序 - 屏幕闪烁片刻并且应用程序终止,则不会触发断点在第二次运行。对于仿真器和物理设备都是如此。Xamarin.Android应用程序没有第二次启动

我怀疑它的问题,但我的代码如下。

布局:

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:minWidth="25px" 
    android:minHeight="25px"> 
    <ImageView 
     android:src="@drawable/splash" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:id="@+id/imageView1" /> 
</LinearLayout> 

活动:

using Android.App; 
using Android.OS; 
using System; 
using Android.Views; 

namespace MyApplication.Activities 
{ 
    [Activity(Label = "My application", MainLauncher = true)] 
    public class SplashActivity : Activity 
    { 
     protected override void OnCreate(Bundle bundle) 
     { 
      base.OnCreate(bundle); 
      RequestWindowFeature(WindowFeatures.NoTitle); 
      SetContentView(Resource.Layout.Splash); 
     } 
    } 
} 

出现了问题,因为它是Xamarin的试用版?

回答

0

好吧,它看起来像试用版确实造成我的问题。亚行logcat有行:

I/ActivityManager( 308): Displayed MyApplication/MyApplication.Activities.SplashActivity: +845ms 
D/Finsky ( 759): [1] 5.onFinished: Installation state replication succeeded. 
I/ActivityManager( 308): START {act=android.intent.action.MAIN cat=[android.int 
ent.category.LAUNCHER] flg=0x10200000 cmp=MyApplication/MyApplication.TrialSplashS 
creenf2b499ae00e24b5ba2aa0253572b8e1e u=0} from pid 518 
D/dalvikvm( 308): GC_FOR_ALLOC freed 1293K, 15% free 18885K/22023K, paused 66ms 
, total 67ms 
D/dalvikvm(7162): Late-enabling CheckJNI 
I/ActivityManager( 308): Start proc MyApplication for activity MyApplication/MyApplication.TrialSplashScreenf2b499ae00e24b5ba2aa0253572b8e1e: pid=7162 uid=10067 g 
ids={3003, 1015, 1028} 
I/dalvikvm(7162): Turning on JNI app bug workarounds for target SDK version 10. 
.. 
I/ActivityThread(7162): Pub MyApplication.mono.MonoRuntimeProvider.__mono_init__ 
: mono.MonoRuntimeProvider 
D/dalvikvm(7162): Trying to load lib /data/data/MyApplication/lib/libmonodroid.s 
o 0x4266ae60 
D/dalvikvm(7162): Added shared lib /data/data/MyApplication/lib/libmonodroid.so 
0x4266ae60 
F/MonoDroid(7162): **This installation has expired**. 
D/Zygote ( 125): Process 7162 exited cleanly (11) 

虽然,审判闪屏状态,即生成将连续工作24小时 - 由于某种原因立即过期。哦,我可以忍受。

更新: 没错,问题消失后,我购买并激活许可证。

相关问题