I would like to ask why is that my code gives me error now? I just copy it from my timer activity only that works fine to my other activity and suddenly it gives me an error?
here's my code
*LogCat
01-28 16:41:34.900: W/dalvikvm(9387): threadid=1: thread exiting with uncaught exception (group=0x4164a8a8)
01-28 16:41:34.910: E/AndroidRuntime(9387): FATAL EXCEPTION: main
01-28 16:41:34.910: E/AndroidRuntime(9387): java.lang.NullPointerException
01-28 16:41:34.910: E/AndroidRuntime(9387): at com.thesis.logipic.Gameplay$MyCount.onTick(Gameplay.java:2776)
01-28 16:41:34.910: E/AndroidRuntime(9387): at android.os.CountDownTimer$1.handleMessage(CountDownTimer.java:124)
01-28 16:41:34.910: E/AndroidRuntime(9387): at android.os.Handler.dispatchMessage(Handler.java:99)
01-28 16:41:34.910: E/AndroidRuntime(9387): at android.os.Looper.loop(Looper.java:153)
01-28 16:41:34.910: E/AndroidRuntime(9387): at android.app.ActivityThread.main(ActivityThread.java:4987)
01-28 16:41:34.910: E/AndroidRuntime(9387): at java.lang.reflect.Method.invokeNative(Native Method)
01-28 16:41:34.910: E/AndroidRuntime(9387): at java.lang.reflect.Method.invoke(Method.java:511)
01-28 16:41:34.910: E/AndroidRuntime(9387): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
01-28 16:41:34.910: E/AndroidRuntime(9387): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
01-28 16:41:34.910: E/AndroidRuntime(9387): at dalvik.system.NativeStart.main(Native Method)
01-28 16:41:36.152: D/AudioTrack(9387): audiotrack 0x52b30c10 stop done
*Timer Activity
http://pastebin.com/7ybnTm9R
*My Activity
http://pastebin.com/bAEszRpL
Related
I working on splash screen. It going to crash on SDK-2.3 and SDK-4.2 can anybody help me what is going wrong.
Java Code: My java code like:
public class SplashActivity extends Activity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
}
}
Splash.xml: This is my splash screen
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
tools:context=".SplashActivity"
android:background="#drawable/splash">
</RelativeLayout>
Exception: I am getting exception like:
01-28 07:24:46.056: E/AndroidRuntime(1669): FATAL EXCEPTION: main
01-28 07:24:46.056: E/AndroidRuntime(1669): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.multicom.techlink.app/com.multicom.techlink.app.SplashActivity}: android.view.InflateException: Binary XML file line #1: Error inflating class android.widget.RelativeLayout
01-28 07:24:46.056: E/AndroidRuntime(1669): at android.app.ActivityThread.main(ActivityThread.java:5041)
01-28 07:24:46.056: E/AndroidRuntime(1669): at java.lang.reflect.Method.invokeNative(Native Method)
01-28 07:24:46.056: E/AndroidRuntime(1669): at java.lang.reflect.Method.invoke(Method.java:511)
01-28 07:24:46.056: E/AndroidRuntime(1669): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
01-28 07:24:46.056: E/AndroidRuntime(1669): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
01-28 07:24:46.056: E/AndroidRuntime(1669): at dalvik.system.NativeStart.main(Native Method)
01-28 07:24:46.056: E/AndroidRuntime(1669): Caused by: android.view.InflateException: Binary XML file line #1: Error inflating class android.widget.RelativeLayout
01-28 07:24:46.056: E/AndroidRuntime(1669): at android.view.LayoutInflater.createView(LayoutInflater.java:613)
01-28 07:24:46.056: E/AndroidRuntime(1669): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
01-28 07:24:46.056: E/AndroidRuntime(1669): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
01-28 07:24:46.056: E/AndroidRuntime(1669): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
01-28 07:24:46.056: E/AndroidRuntime(1669): at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
01-28 07:24:46.056: E/AndroidRuntime(1669): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-28 07:24:46.056: E/AndroidRuntime(1669): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-28 07:24:46.056: E/AndroidRuntime(1669): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
01-28 07:24:46.056: E/AndroidRuntime(1669): at android.app.Activity.setContentView(Activity.java:1881)
01-28 07:24:46.056: E/AndroidRuntime(1669): at com.multicom.techlink.app.SplashActivity.onCreate(SplashActivity.java:20)
01-28 07:24:46.056: E/AndroidRuntime(1669): at android.app.Activity.performCreate(Activity.java:5104)
01-28 07:24:46.056: E/AndroidRuntime(1669): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
01-28 07:24:46.056: E/AndroidRuntime(1669): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
01-28 07:24:46.056: E/AndroidRuntime(1669): ... 11 more
01-28 07:24:46.056: E/AndroidRuntime(1669): Caused by: java.lang.reflect.InvocationTargetException
01-28 07:24:46.056: E/AndroidRuntime(1669): at java.lang.reflect.Constructor.constructNative(Native Method)
01-28 07:24:46.056: E/AndroidRuntime(1669): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
01-28 07:24:46.056: E/AndroidRuntime(1669): at android.view.LayoutInflater.createView(LayoutInflater.java:587)
01-28 07:24:46.056: E/AndroidRuntime(1669): ... 23 more
01-28 07:24:46.056: E/AndroidRuntime(1669): Caused by: android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f02007d a=-1 r=0x7f02007d}
01-28 07:24:46.056: E/AndroidRuntime(1669):
01-28 15:35:46.105: D/AndroidRuntime(7819): Shutting down VM
01-28 15:35:46.105: W/dalvikvm(7819): threadid=1: thread exiting with uncaught exception (group=0x41b85700)
01-28 15:35:46.110: E/AndroidRuntime(7819): FATAL EXCEPTION: main
01-28 15:35:46.110: E/AndroidRuntime(7819): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{in.altersense.radioremote/in.altersense.radioremote.SplashScreenActivity}: java.lang.ClassNotFoundException: Didn't find class "in.altersense.radioremote.SplashScreenActivity" on path: /data/app/in.altersense.radioremote-2.apk
01-28 15:35:46.110: E/AndroidRuntime(7819): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2219)
01-28 15:35:46.110: E/AndroidRuntime(7819): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349)
01-28 15:35:46.110: E/AndroidRuntime(7819): at android.app.ActivityThread.access$700(ActivityThread.java:159)
01-28 15:35:46.110: E/AndroidRuntime(7819): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
01-28 15:35:46.110: E/AndroidRuntime(7819): at android.os.Handler.dispatchMessage(Handler.java:99)
01-28 15:35:46.110: E/AndroidRuntime(7819): at android.os.Looper.loop(Looper.java:176)
01-28 15:35:46.110: E/AndroidRuntime(7819): at android.app.ActivityThread.main(ActivityThread.java:5419)
01-28 15:35:46.110: E/AndroidRuntime(7819): at java.lang.reflect.Method.invokeNative(Native Method)
01-28 15:35:46.110: E/AndroidRuntime(7819): at java.lang.reflect.Method.invoke(Method.java:525)
01-28 15:35:46.110: E/AndroidRuntime(7819): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
01-28 15:35:46.110: E/AndroidRuntime(7819): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
01-28 15:35:46.110: E/AndroidRuntime(7819): at dalvik.system.NativeStart.main(Native Method)
01-28 15:35:46.110: E/AndroidRuntime(7819): Caused by: java.lang.ClassNotFoundException: Didn't find class "in.altersense.radioremote.SplashScreenActivity" on path: /data/app/in.altersense.radioremote-2.apk
01-28 15:35:46.110: E/AndroidRuntime(7819): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:64)
01-28 15:35:46.110: E/AndroidRuntime(7819): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
01-28 15:35:46.110: E/AndroidRuntime(7819): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
01-28 15:35:46.110: E/AndroidRuntime(7819): at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
01-28 15:35:46.110: E/AndroidRuntime(7819): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2210)
01-28 15:35:46.110: E/AndroidRuntime(7819): ... 11 more
The code has no errors. But after the forced checkout the android build paths and properties where all changed and I had to clean the project and reset the Java Build Path to reach a stable version but then the above error occurs.
Since the changes happened during a checkout and the project properties were altered I removed the Project from eclipse and deleted the files from the disk. I did a
git reset --hard
and imported the files to eclipse as a new android project with existing sources and everything worked fine.
Hi i'm trying to implement google api in android. I got the map displayed.Now I want to implement the same with routes of 2 user given addresses. First of all i tried to display with a single text box and a button. I am getting the following error in the logcat :
01-28 07:14:29.500: W/GooglePlayServicesUtil(827): Google Play Store is missing.
01-28 07:14:29.550: W/GooglePlayServicesUtil(827): Google Play Store is missing.
01-28 07:14:29.550: W/GooglePlayServicesUtil(827): Google Play Store is missing.
01-28 07:14:29.590: W/GooglePlayServicesUtil(827): Google Play Store is missing.
01-28 07:14:29.590: W/GooglePlayServicesUtil(827): Google Play Store is missing.
01-28 07:14:29.670: W/GooglePlayServicesUtil(827): Google Play Store is missing.
01-28 07:14:29.690: W/GooglePlayServicesUtil(827): Google Play Store is missing.
01-28 07:14:30.030: I/Choreographer(827): Skipped 54 frames! The application may be doing too much work on its main thread.
01-28 07:14:31.530: D/gralloc_goldfish(827): Emulator without GPU emulation detected.
01-28 07:10:03.846: I/Choreographer(827): Skipped 61 frames! The application may be doing too much work on its main thread.
01-28 07:10:12.196: D/AndroidRuntime(827): Shutting down VM
01-28 07:10:12.196: W/dalvikvm(827): threadid=1: thread exiting with uncaught exception (group=0xb3aaeb90)
01-28 07:10:12.236: E/AndroidRuntime(827): FATAL EXCEPTION: main
01-28 07:10:12.236: E/AndroidRuntime(827): Process: com.example.locationgooglemap, PID: 827
01-28 07:10:12.236: E/AndroidRuntime(827): java.lang.NullPointerException
01-28 07:10:12.236: E/AndroidRuntime(827): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1417)
01-28 07:10:12.236: E/AndroidRuntime(827): at android.app.Activity.startActivityForResult(Activity.java:3423)
01-28 07:10:12.236: E/AndroidRuntime(827): at android.app.Activity.startActivityForResult(Activity.java:3384)
01-28 07:10:12.236: E/AndroidRuntime(827): at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:839)
01-28 07:10:12.236: E/AndroidRuntime(827): at android.app.Activity.startActivity(Activity.java:3626)
01-28 07:10:12.236: E/AndroidRuntime(827): at android.app.Activity.startActivity(Activity.java:3594)
01-28 07:10:12.236: E/AndroidRuntime(827): at com.google.android.gms.dynamic.a$5.onClick(Unknown Source)
01-28 07:10:12.236: E/AndroidRuntime(827): at android.view.View.performClick(View.java:4424)
01-28 07:10:12.236: E/AndroidRuntime(827): at android.view.View$PerformClick.run(View.java:18383)
01-28 07:10:12.236: E/AndroidRuntime(827): at android.os.Handler.handleCallback(Handler.java:733)
01-28 07:10:12.236: E/AndroidRuntime(827): at android.os.Handler.dispatchMessage(Handler.java:95)
01-28 07:10:12.236: E/AndroidRuntime(827): at android.os.Looper.loop(Looper.java:137)
01-28 07:10:12.236: E/AndroidRuntime(827): at android.app.ActivityThread.main(ActivityThread.java:4998)
01-28 07:10:12.236: E/AndroidRuntime(827): at java.lang.reflect.Method.invokeNative(Native Method)
01-28 07:10:12.236: E/AndroidRuntime(827): at java.lang.reflect.Method.invoke(Method.java:515)
01-28 07:10:12.236: E/AndroidRuntime(827): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
01-28 07:10:12.236: E/AndroidRuntime(827): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
01-28 07:10:12.236: E/AndroidRuntime(827): at dalvik.system.NativeStart.main(Native Method)
01-28 07:10:12.296: D/dalvikvm(827): GC_FOR_ALLOC freed 159K, 8% free 3122K/3364K, paused 35ms, total 47ms
Can anyone give me a solution? I am pretty new to Android and find it.little bit difficult.
Is that mandatory to give WAKE_LOCK permission in AndEngine?
If i try to remove this WAKE_LOCK permission I am getting SecurityException.
logCat ERROR:
01-28 09:57:48.417: DEBUG/dalvikvm(166): Added shared lib /system/lib/libjni_latinime.so 0x437577d0
01-28 09:59:02.966: ERROR/AndEngine(225): You have to add
01-28 09:59:02.966: ERROR/AndEngine(225): <uses-permission android:name="android.permission.WAKE_LOCK"/>
01-28 09:59:02.966: ERROR/AndEngine(225): to your AndroidManifest.xml !
01-28 09:59:02.966: ERROR/AndEngine(225): java.lang.SecurityException: Neither user 10024 nor current process has android.permission.WAKE_LOCK.
01-28 09:59:02.966: ERROR/AndEngine(225): at android.os.Parcel.readException(Parcel.java:1218)
01-28 09:59:02.966: ERROR/AndEngine(225): at android.os.Parcel.readException(Parcel.java:1206)
01-28 09:59:02.966: ERROR/AndEngine(225): at android.os.IPowerManager$Stub$Proxy.acquireWakeLock(IPowerManager.java:178)
01-28 09:59:02.966: ERROR/AndEngine(225): at android.os.PowerManager$WakeLock.acquire(PowerManager.java:228)
01-28 09:59:02.966: ERROR/AndEngine(225): at org.anddev.andengine.ui.activity.BaseGameActivity.acquireWakeLock(BaseGameActivity.java:200)
01-28 09:59:02.966: ERROR/AndEngine(225): at org.anddev.andengine.ui.activity.BaseGameActivity.doResume(BaseGameActivity.java:166)
01-28 09:59:02.966: ERROR/AndEngine(225): at org.anddev.andengine.ui.activity.BaseGameActivity.onWindowFocusChanged(BaseGameActivity.java:83)
01-28 09:59:02.966: ERROR/AndEngine(225): at com.android.internal.policy.impl.PhoneWindow$DecorView.onWindowFocusChanged(PhoneWindow.java:2027)
01-28 09:59:02.966: ERROR/AndEngine(225): at android.view.View.dispatchWindowFocusChanged(View.java:3694)
01-28 09:59:02.966: ERROR/AndEngine(225): at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:655)
01-28 09:59:02.966: ERROR/AndEngine(225): at android.view.ViewRoot.handleMessage(ViewRoot.java:1782)
01-28 09:59:02.966: ERROR/AndEngine(225): at android.os.Handler.dispatchMessage(Handler.java:99)
01-28 09:59:02.966: ERROR/AndEngine(225): at android.os.Looper.loop(Looper.java:123)
01-28 09:59:02.966: ERROR/AndEngine(225): at android.app.ActivityThread.main(ActivityThread.java:4203)
01-28 09:59:02.966: ERROR/AndEngine(225): at java.lang.reflect.Method.invokeNative(Native Method)
01-28 09:59:02.966: ERROR/AndEngine(225): at java.lang.reflect.Method.invoke(Method.java:521)
01-28 09:59:02.966: ERROR/AndEngine(225): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
01-28 09:59:02.966: ERROR/AndEngine(225): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
01-28 09:59:02.966: ERROR/AndEngine(225): at dalvik.system.NativeStart.main(Native Method)
Not required, see: https://github.com/nicolasgramlich/AndEngine/blob/GLES2-AnchorCenter/src/org/andengine/engine/options/WakeLockOptions.java#L24 . Use SCREEN_ON.
There is no need for setting wakelock permission,but it is mandatory because if the screen timer expires(for example 15 or 20 seconds),the screen will be blank,interrupting the game and you have to open(wake) the phone again.So,it is necessery.
01-28 13:51:17.332: D/AndroidRuntime(766): Shutting down VM
01-28 13:51:17.332: W/dalvikvm(766): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
01-28 13:51:17.522: E/AndroidRuntime(766): FATAL EXCEPTION: main
01-28 13:51:17.522: E/AndroidRuntime(766): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.canadaqbank.usmle/com.canadaqbank.usmle.USMLEActivity}: java.lang.ClassNotFoundException: com.canadaqbank.usmle.USMLEActivity in loader dalvik.system.PathClassLoader[/data/app/com.canadaqbank.usmle-1.apk]
01-28 13:51:17.522: E/AndroidRuntime(766): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
01-28 13:51:17.522: E/AndroidRuntime(766): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
01-28 13:51:17.522: E/AndroidRuntime(766): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
01-28 13:51:17.522: E/AndroidRuntime(766): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
01-28 13:51:17.522: E/AndroidRuntime(766): at android.os.Handler.dispatchMessage(Handler.java:99)
01-28 13:51:17.522: E/AndroidRuntime(766): at android.os.Looper.loop(Looper.java:123)
01-28 13:51:17.522: E/AndroidRuntime(766): at android.app.ActivityThread.main(ActivityThread.java:4627)
01-28 13:51:17.522: E/AndroidRuntime(766): at java.lang.reflect.Method.invokeNative(Native Method)
01-28 13:51:17.522: E/AndroidRuntime(766): at java.lang.reflect.Method.invoke(Method.java:521)
01-28 13:51:17.522: E/AndroidRuntime(766): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-28 13:51:17.522: E/AndroidRuntime(766): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-28 13:51:17.522: E/AndroidRuntime(766): at dalvik.system.NativeStart.main(Native Method)
01-28 13:51:17.522: E/AndroidRuntime(766): Caused by: java.lang.ClassNotFoundException: com.canadaqbank.usmle.USMLEActivity in loader dalvik.system.PathClassLoader[/data/app/com.canadaqbank.usmle-1.apk]
01-28 13:51:17.522: E/AndroidRuntime(766): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
01-28 13:51:17.522: E/AndroidRuntime(766): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
01-28 13:51:17.522: E/AndroidRuntime(766): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
01-28 13:51:17.522: E/AndroidRuntime(766): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
01-28 13:51:17.522: E/AndroidRuntime(766): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
01-28 13:51:17.522: E/AndroidRuntime(766): ... 11 more
I want to call one project classes into another project without keep all the entire code in this project, I added it in the build path and also declared that class in the manifest file but when I call it gives me a android.view.InflateException: Binary XML file line #8: Error inflating class . I am calling it from intent.
android.view.InflateException: Binary XML file line #8: Error inflating class com.bank.Header
01-28 10:42:57.503: E/AndroidRuntime(309): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
01-28 10:42:57.503: E/AndroidRuntime(309): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
01-28 10:42:57.503: E/AndroidRuntime(309): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
01-28 10:42:57.503: E/AndroidRuntime(309): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
01-28 10:42:57.503: E/AndroidRuntime(309): at android.os.Handler.dispatchMessage(Handler.java:99)
01-28 10:42:57.503: E/AndroidRuntime(309): at android.os.Looper.loop(Looper.java:123)
01-28 10:42:57.503: E/AndroidRuntime(309): at android.app.ActivityThread.main(ActivityThread.java:4627)
01-28 10:42:57.503: E/AndroidRuntime(309): at java.lang.reflect.Method.invokeNative(Native Method)
01-28 10:42:57.503: E/AndroidRuntime(309): at java.lang.reflect.Method.invoke(Method.java:521)
01-28 10:42:57.503: E/AndroidRuntime(309): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-28 10:42:57.503: E/AndroidRuntime(309): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-28 10:42:57.503: E/AndroidRuntime(309): at dalvik.system.NativeStart.main(Native Method)
01-28 10:42:57.503: E/AndroidRuntime(309): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.bank.Header
01-28 10:42:57.503: E/AndroidRuntime(309): at android.view.LayoutInflater.createView(LayoutInflater.java:513)
01-28 10:42:57.503: E/AndroidRuntime(309): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
01-28 10:42:57.503: E/AndroidRuntime(309): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
01-28 10:42:57.503: E/AndroidRuntime(309): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
01-28 10:42:57.503: E/AndroidRuntime(309): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
01-28 10:42:57.503: E/AndroidRuntime(309): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
01-28 10:42:57.503: E/AndroidRuntime(309): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
01-28 10:42:57.503: E/AndroidRuntime(309): at android.app.Activity.setContentView(Activity.java:1647)
01-28 10:42:57.503: E/AndroidRuntime(309): at com.bank.us.USActivity.onCreate(USActivity.java:25)
01-28 10:42:57.503: E/AndroidRuntime(309): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-28 10:42:57.503: E/AndroidRuntime(309): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
01-28 10:42:57.503: E/AndroidRuntime(309): ... 11 more
01-28 10:42:57.503: E/AndroidRuntime(309): Caused by: java.lang.reflect.InvocationTargetException
01-28 10:42:57.503: E/AndroidRuntime(309): at com.bank.Header.<init>(Header.java:223)
01-28 10:42:57.503: E/AndroidRuntime(309): at java.lang.reflect.Constructor.constructNative(Native Method)
01-28 10:42:57.503: E/AndroidRuntime(309): at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
01-28 10:42:57.503: E/AndroidRuntime(309): at android.view.LayoutInflater.createView(LayoutInflater.java:500)
01-28 10:42:57.503: E/AndroidRuntime(309): ... 21 more
01-28 10:42:57.503: E/AndroidRuntime(309): Caused by: java.lang.NullPointerException
01-28 10:42:57.503: E/AndroidRuntime(309): ... 25 more
Update : - New logcat Error
01-28 13:51:17.332: D/AndroidRuntime(766): Shutting down VM
01-28 13:51:17.332: W/dalvikvm(766): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
01-28 13:51:17.522: E/AndroidRuntime(766): FATAL EXCEPTION: main
01-28 13:51:17.522: E/AndroidRuntime(766): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.bank.us/com.bank.us.USActivity}: java.lang.ClassNotFoundException: com.bank.us.USActivity in loader dalvik.system.PathClassLoader[/data/app/com.bank.us-1.apk]
01-28 13:51:17.522: E/AndroidRuntime(766): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
01-28 13:51:17.522: E/AndroidRuntime(766): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
01-28 13:51:17.522: E/AndroidRuntime(766): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
01-28 13:51:17.522: E/AndroidRuntime(766): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
01-28 13:51:17.522: E/AndroidRuntime(766): at android.os.Handler.dispatchMessage(Handler.java:99)
01-28 13:51:17.522: E/AndroidRuntime(766): at android.os.Looper.loop(Looper.java:123)
01-28 13:51:17.522: E/AndroidRuntime(766): at android.app.ActivityThread.main(ActivityThread.java:4627)
01-28 13:51:17.522: E/AndroidRuntime(766): at java.lang.reflect.Method.invokeNative(Native Method)
01-28 13:51:17.522: E/AndroidRuntime(766): at java.lang.reflect.Method.invoke(Method.java:521)
01-28 13:51:17.522: E/AndroidRuntime(766): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-28 13:51:17.522: E/AndroidRuntime(766): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-28 13:51:17.522: E/AndroidRuntime(766): at dalvik.system.NativeStart.main(Native Method)
01-28 13:51:17.522: E/AndroidRuntime(766): Caused by: java.lang.ClassNotFoundException: com.canadaqbank.usmle.USMLEActivity in loader dalvik.system.PathClassLoader[/data/app/com.canadaqbank.usmle-1.apk]
01-28 13:51:17.522: E/AndroidRuntime(766): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
01-28 13:51:17.522: E/AndroidRuntime(766): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
01-28 13:51:17.522: E/AndroidRuntime(766): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
01-28 13:51:17.522: E/AndroidRuntime(766): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
01-28 13:51:17.522: E/AndroidRuntime(766): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
01-28 13:51:17.522: E/AndroidRuntime(766): ... 11 more
If you are starting another project's activity then you can do it by this way:
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setComponent(new ComponentName(
"com.abc.def.packname",
"com.abc.def.packname.MyActivity"));
startActivity(intent);