嗨我实现了一个启动画面,在我的主课前启动。令我惊讶的是,在我的启动画面加载后,强制关闭我的应用程序时出现了logcat错误:说找不到类,如果我确定我已经在我的清单中声明了它已经完成了。我不知道我哪里出错了加上我错过了什么。请帮忙 。
清单文件
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="hellog.diwesh.NugaBest"
android:versionCode="1"
android:versionName="1.0"
android:hardwareAccelerated="true" >
<uses-sdk android:minSdkVersion="11" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:name="helog.diwesh.NugaBest.MyApplication"
android:debuggable="true"
android:icon="@drawable/nuga"
android:label="@string/app_name" >
<activity
android:name="helog.diwesh.NugaBest.SplashScreen"
android:configChanges="orientation|keyboardHidden"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
// 4. Layout Management
<activity
android:name="helog.diwesh.NUGA_HealthCareActivity_Intro"
android:label="NUGA_HealthCareActivity_Intro" />
<activity
android:name="helog.diwesh.NugaBest.FileSiganlDisplay"
android:label="FileSiganlDisplay" />
<activity
android:name="helog.diwesh.NugaBest.NUGA_WebJoinActivity"
android:label="NUGA_WebJoinActivity"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="helog.diwesh.NugaBest.NUGA_MainMenuActivity"
android:label="NUGA_MainMenuActivity" />
<activity
android:name="helog.diwesh.NugaBest.BTSmartSlavemodule"
android:configChanges="orientation|keyboardHidden"
android:label="SmartSlavemodule" />
<activity
android:name="helog.diwesh.NugaBest.BTDeviceListActivity"
android:configChanges="orientation|keyboardHidden"
android:label="@string/select_device"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="helog.diwesh.NugaBest.SnapActivity"
android:label="@string/title_activity_snap" >
</activity>
<activity
android:name="helog.diwesh.NugaBest.ImagesActivity"
android:label="@string/title_activity_images" >
</activity>
<activity
android:name="helog.diwesh.NugaBest.HelpActivity"
android:label="@string/Help" >
</activity>
<activity
android:name="helog.diwesh.NugaBest.AboutDevice"
android:label="@string/aboutus" >
</activity>
<activity
android:name="helog.diwesh.NugaBest.Savenotes"
android:label="@string/savenotes" >
</activity>
//Notepad
<activity
android:name="helog.diwesh.NugaBest.NotepadActivity">
</activity>
<activity
android:name="helog.diwesh.NugaBest.NotesListActivity">
</activity>
<activity
android:name="helog.diwesh.NugaBest.NotesDbAdapter">
</activity>
</application>
</manifest>
LogCat错误
09-25 20:29:37.272: D/dalvikvm(781): GC_FOR_ALLOC freed 89K, 8% free 2654K/2864K, paused 43ms, total 58ms
09-25 20:29:37.292: I/dalvikvm-heap(781): Grow heap (frag case) to 5.563MB for 2998216-byte allocation
09-25 20:29:37.362: D/dalvikvm(781): GC_FOR_ALLOC freed 2K, 4% free 5579K/5792K, paused 65ms, total 65ms
09-25 20:29:38.592: D/gralloc_goldfish(781): Emulator without GPU emulation detected.
09-25 20:29:41.934: W/dalvikvm(781): threadid=11: thread exiting with uncaught exception (group=0x41465700)
09-25 20:29:41.953: E/AndroidRuntime(781): FATAL EXCEPTION: Thread-72
09-25 20:29:41.953: E/AndroidRuntime(781): android.content.ActivityNotFoundException: Unable to find explicit activity class {hellog.diwesh.NugaBest/helog.diwesh.NugaBest.NUGA_HealthCareActivity_Intro}; have you declared this activity in your AndroidManifest.xml?
09-25 20:29:41.953: E/AndroidRuntime(781): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1628)
09-25 20:29:41.953: E/AndroidRuntime(781): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)
09-25 20:29:41.953: E/AndroidRuntime(781): at android.app.Activity.startActivityForResult(Activity.java:3390)
09-25 20:29:41.953: E/AndroidRuntime(781): at android.app.Activity.startActivityForResult(Activity.java:3351)
09-25 20:29:41.953: E/AndroidRuntime(781): at android.app.Activity.startActivity(Activity.java:3587)
09-25 20:29:41.953: E/AndroidRuntime(781): at android.app.Activity.startActivity(Activity.java:3555)
09-25 20:29:41.953: E/AndroidRuntime(781): at helog.diwesh.NugaBest.SplashScreen$1.run(SplashScreen.java:34)
09-25 20:30:20.892: I/Process(781): Sending signal. PID: 781 SIG: 9
SplashScreen.java
public class SplashScreen extends Activity {
protected boolean _active = true;
protected int _splashTime = 3000; // time to display the splash screen in Ms
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash_screen);
Thread splashTread = new Thread() {
@Override
public void run() {
try {
int waited = 0;
while (_active && (waited < _splashTime)) {
sleep(100);
if (_active) {
waited += 100;
}
}
} catch (Exception e) {
} finally {
startActivity(new Intent(SplashScreen.this,
NUGA_HealthCareActivity_Intro.class));
finish();
}
};
};
splashTread.start();
}
}
答案 0 :(得分:0)
您错误地定义了INTRO活动(您忘记了NugaBest
包)。
试试这个:
<activity
android:name="helog.diwesh.NugaBest.NUGA_HealthCareActivity_Intro"
android:label="NUGA_HealthCareActivity_Intro" />
希望这有帮助!