[Android Q&A, Help & Troubleshooting] DigginGraves:
Thanks a lot for your help!

This line is giving me an error upon debug:

Intent intent = pm.getLaunchIntentForPackage("com.cyanogenmod.trebuchet.preference.Preferences");

The commands 'Intent intent" and "PackageManager" are not recognized. Eclipse suggests changing them, importing them, or creating a class. What should I do?

This is the logcat:

I/ActivityManager( 524): START u0 {act=android.intent.action.MAIN cat=[android.
intent.category.LAUNCHER] flg=0x10200000 cmp=com.AB.launchersettings/.MainActivi
ty} from pid 876
D/ALSAModule( 175): setHardwareParams: reqBuffSize 1024 channels 2 sampleRate 4
8000
D/ALSAModule( 175): setHardwareParams: buffer_size 2048, period_size 1024, peri
od_cnt 2
D/dalvikvm(26747): Late-enabling CheckJNI
I/ActivityManager( 524): Start proc com.AB.launchersettings for activity com.AB
.launchersettings/.MainActivity: pid=26747 uid=10046 gids={50046, 1028}
D/overlay ( 172): FROM_STATE = OV_BYPASS_3_LAYER TO_STATE = OV_CLOSED
E/Trace (26747): error opening trace file: No such file or directory (2)
D/AndroidRuntime(26747): Shutting down VM
W/dalvikvm(26747): threadid=1: thread exiting with uncaught exception (group=0x4
0a4a888)
E/AndroidRuntime(26747): FATAL EXCEPTION: main
E/AndroidRuntime(26747): java.lang.RuntimeException: Unable to start activity Co
mponentInfo{com.AB.launchersettings/com.AB.launchersettings.MainActivity}: java.
lang.NullPointerException
E/AndroidRuntime(26747): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2307)
E/AndroidRuntime(26747): at android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2357)
E/AndroidRuntime(26747): at android.app.ActivityThread.access$600(Activit
yThread.java:153)
E/AndroidRuntime(26747): at android.app.ActivityThread$H.handleMessage(Ac
tivityThread.java:1247)
E/AndroidRuntime(26747): at android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime(26747): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(26747): at android.app.ActivityThread.main(ActivityThrea
d.java:5231)
E/AndroidRuntime(26747): at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime(26747): at java.lang.reflect.Method.invoke(Method.java:5
11)
E/AndroidRuntime(26747): at com.android.internal.os.ZygoteInit$MethodAndA
rgsCaller.run(ZygoteInit.java:794)
E/AndroidRuntime(26747): at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:561)
E/AndroidRuntime(26747): at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime(26747): Caused by: java.lang.NullPointerException
E/AndroidRuntime(26747): at android.app.Instrumentation.execStartActivity
(Instrumentation.java:1410)
E/AndroidRuntime(26747): at android.app.Activity.startActivityForResult(A
ctivity.java:3376)
E/AndroidRuntime(26747): at android.app.Activity.startActivityForResult(A
ctivity.java:3337)
E/AndroidRuntime(26747): at android.app.Activity.startActivity(Activity.j
ava:3572)
E/AndroidRuntime(26747): at android.app.Activity.startActivity(Activity.j
ava:3540)
E/AndroidRuntime(26747): at com.AB.launchersettings.MainActivity.onCreate
(MainActivity.java:16)
E/AndroidRuntime(26747): at android.app.Activity.performCreate(Activity.j
ava:5110)
E/AndroidRuntime(26747): at android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1080)
E/AndroidRuntime(26747): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2261)
E/AndroidRuntime(26747): ... 11 more
W/ActivityManager( 524): Force finishing activity com.AB.launchersettings/.Ma
inActivity
D/dalvikvm( 524): GC_FOR_ALLOC freed 1154K, 23% free 26363K/33812K, paused 86ms
, total 86ms
W/BackupManagerService( 524): dataChanged but no participant pkg='com.android.p
roviders.settings' uid=10031
W/ActivityManager( 524): Activity pause timeout for ActivityRecord{40cbfcc8 u0
com.AB.launchersettings/.MainActivity}
D/alsa_ucm( 175): snd_use_case_set(): uc_mgr 0x2a0092a0 identifier _verb value
Inactive
D/alsa_ucm( 175): Set mixer controls for HiFi Lowlatency enable 0
D/alsa_ucm( 175): snd_use_case_set(): uc_mgr 0x2a0092a0 identifier _disdev valu
e Speaker
D/alsa_ucm( 175): Set mixer controls for Speaker enable 0
W/ActivityManager( 524): Activity destroy timeout for ActivityRecord{40cbfcc8 u
0 com.AB.launchersettings/.MainActivity}

What I did:

Created a new project ( Filled up the name, icon and stuff)

Went straight to MainActivity.java, and put what you gave me in it.

Debugged the app by installing it on my Nexus 4.