为了账号安全,请及时绑定邮箱和手机立即绑定

android应用运行不起来

android应用运行不起来

呼如林 2019-03-21 15:11:34
我的应用中要用到线程和intent,但是应用运行不起来。也没有任何警告和报错。Manifest代码:<uses-sdk     android:minSdkVersion="8"     android:targetSdkVersion="17" /> <application     android:allowBackup="true"     android:icon="@drawable/ic_launcher"     android:label="@string/app_name"     android:theme="@style/AppTheme" >     <activity         android:name="com.example.learn.tam.Splash"         android:label="@string/app_name" >         <intent-filter>             <action android:name="android.intent.action.SPLASH" />             <category android:name="android.intent.category.LAUNCHER" />         </intent-filter>     </activity>     <activity         android:name="com.example.learn.tam.StartingPoint"         android:label="@string/app_name" >     </activity>  </application> </manifest>Activity代码:package com.example.learn.tam; import android.app.Activity; import android.content.Intent; import android.os.Bundle; public class Splash extends Activity{ @Override protected void onCreate(Bundle savedInstanceState) {     // TODO Auto-generated method stub     super.onCreate(savedInstanceState);     setContentView(R.layout.splash);     Thread timer = new Thread(){         public void run(){             try {                 sleep(5000);             }             catch (InterruptedException e){                 e.printStackTrace();             }             finally{ Intent openStartingPoint = new   Intent("com.example.learn.tam.StartingPoint");  startActivity(openStartingPoint);             }         }     };     timer.start(); } }请高手指点一下,谢谢。
查看完整描述

4 回答

?
慕容708150

TA贡献1831条经验 获得超4个赞

没有主activity如何显示,其实已经运行了,只是没有界面而已


查看完整回答
反对 回复 2019-04-27

添加回答

代码语言

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号