Failed to start activity android.view.InflateException
I have a created android project and inside it I created two packages
--net.website.custom_listview
--main_activity_customview.java
--other files .....
--net.website.dashboard
--main_activity_dashboard.java
--other files .....
in my AndroidManifest.xml file
<activity
android:name="net.website.dashboard.main_activity_dashboard"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
so when i run android app i get following errors.
here is my logCat:
03-08 22:02:03.941: E/AndroidRuntime(691): FATAL EXCEPTION: main
03-08 22:02:03.941: E/AndroidRuntime(691): java.lang.RuntimeException: Unable to start activity ComponentInfo{net.website/net.website.dashboard.Main_Activity_Dashboard}: android.view.InflateException: Binary XML file line #1: Error inflating class net.website.dashboard
03-08 22:02:03.941: E/AndroidRuntime(691): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
03-08 22:02:03.941: E/AndroidRuntime(691): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
03-08 22:02:03.941: E/AndroidRuntime(691): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
03-08 22:02:03.941: E/AndroidRuntime(691): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
03-08 22:02:03.941: E/AndroidRuntime(691): at android.os.Handler.dispatchMessage(Handler.java:99)
03-08 22:02:03.941: E/AndroidRuntime(691): at android.os.Looper.loop(Looper.java:123)
03-08 22:02:03.941: E/AndroidRuntime(691): at android.app.ActivityThread.main(ActivityThread.java:3683)
03-08 22:02:03.941: E/AndroidRuntime(691): at java.lang.reflect.Method.invokeNative(Native Method)
03-08 22:02:03.941: E/AndroidRuntime(691): at java.lang.reflect.Method.invoke(Method.java:507)
03-08 22:02:03.941: E/AndroidRuntime(691): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
03-08 22:02:03.941: E/AndroidRuntime(691): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
03-08 22:02:03.941: E/AndroidRuntime(691): at dalvik.system.NativeStart.main(Native Method)
03-08 22:02:03.941: E/AndroidRuntime(691): Caused by: android.view.InflateException: Binary XML file line #1: Error inflating class net.website.dashboard
03-08 22:02:03.941: E/AndroidRuntime(691): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581)
03-08 22:02:03.941: E/AndroidRuntime(691): at android.view.LayoutInflater.parseInclude(LayoutInflater.java:684)
03-08 22:02:03.941: E/AndroidRuntime(691): at android.view.LayoutInflater.rInflate(LayoutInflater.java:619)
03-08 22:02:03.941: E/AndroidRuntime(691): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
03-08 22:02:03.941: E/AndroidRuntime(691): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
03-08 22:02:03.941: E/AndroidRuntime(691): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
03-08 22:02:03.941: E/AndroidRuntime(691): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
03-08 22:02:03.941: E/AndroidRuntime(691): at android.app.Activity.setContentView(Activity.java:1657)
03-08 22:02:03.941: E/AndroidRuntime(691): at net.website.dashboard.Main_Activity_Dashboard.onCreate(Main_Activity_Dashboard.java:16)
03-08 22:02:03.941: E/AndroidRuntime(691): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-08 22:02:03.941: E/AndroidRuntime(691): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
03-08 22:02:03.941: E/AndroidRuntime(691): ... 11 more
03-08 22:02:03.941: E/AndroidRuntime(691): Caused by: java.lang.ClassNotFoundException: net.website.dashboard in loader dalvik.system.PathClassLoader[/data/app/net.website-2.apk]
03-08 22:02:03.941: E/AndroidRuntime(691): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
03-08 22:02:03.941: E/AndroidRuntime(691): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
03-08 22:02:03.941: E/AndroidRuntime(691): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
03-08 22:02:03.941: E/AndroidRuntime(691): at android.view.LayoutInflater.createView(LayoutInflater.java:471)
03-08 22:02:03.941: E/AndroidRuntime(691): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
+3
source to share