How to resolve ResourceNotFoundException on splash screen in android - android

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):

Related

Facebook-sdk not working after androidstudio update to 0.8.1

I'm working on an android application that uses facebook sdk 3.6.0, in android studio 0.5.7, after update to 0.8.1 ... facebook sdk does not work,
the following error appears :
07-14 11:39:59.808 544-544/com.example.testdrawer E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.testdrawer/com.example.testdrawer.LoginActivity}: android.view.InflateException: Binary XML file line #36: Error inflating class com.facebook.widget.LoginButton
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1955)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980)
at android.app.ActivityThread.access$600(ActivityThread.java:122)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4340)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at comm.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #36: Error inflating class com.facebook.widget.LoginButton
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
at android.app.Activity.setContentView(Activity.java:1835)
at com.example.testdrawer.LoginActivity.onCreate(LoginActivity.java:65)
at android.app.Activity.performCreate(Activity.java:4465)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1919)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980)
 
at android.app.ActivityThread.access$600(ActivityThread.java:122)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4340)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
            at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.facebook.widget.LoginButton
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.view.LayoutInflater.createView(LayoutInflater.java:552)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
            at android.app.Activity.setContentView(Activity.java:1835)
            at com.example.testdrawer.LoginActivity.onCreate(LoginActivity.java:65)
            at android.app.Activity.performCreate(Activity.java:4465)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1919)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980)
            at android.app.ActivityThread.access$600(ActivityThread.java:122)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4340)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
            at dalvik.system.NativeStart.main(Native Method)
I also changed gradle from 9 to 12
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
}
How to solve this problem?
thank you!
I do not know exactly what I did, but it works !
I cleaned the project (build-clear project) and I changed something in build.grandle
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion '19.1.0'
defaultConfig {
minSdkVersion 10
targetSdkVersion 14
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:+'
compile project(':libraries:facebook')
compile 'com.google.android.gms:play-services:4.2.42'
compile 'com.android.support:appcompat-v7:+'
}

Unable to instantiate activity after a checkout that made some random changes

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.

Error on Timer?

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

resouce not found but it's in its place

My reports provide me this error but I can't understand how is it possible?
java.lang.RuntimeException: Unable to start activity ComponentInfo{net.aviascanner.aviascanner/net.aviascanner.aviascanner.ui.activities.GetCitiesActivity}: android.view.InflateException: Binary XML file line #11: Error inflating class <unknown>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2753)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:513)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
... 12 more
Caused by: java.lang.reflect.InvocationTargetException
at android.widget.EditText.<init>(EditText.java:51)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
... 25 more
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/selector_edittext.xml from drawable resource ID #0x7f0200c4
at android.content.res.Resources.loadDrawable(Resources.java:1725)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
... 29 more
Caused by: java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
... 33 more
android.view.InflateException: Binary XML file line #11: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:513)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at android.widget.EditText.<init>(EditText.java:51)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
... 25 more
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/selector_edittext.xml from drawable resource ID #0x7f0200c4
at android.content.res.Resources.loadDrawable(Resources.java:1725)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
... 29 more
Caused by: java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
... 33 more
java.lang.reflect.InvocationTargetException
at android.widget.EditText.<init>(EditText.java:51)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/selector_edittext.xml from drawable resource ID #0x7f0200c4
at android.content.res.Resources.loadDrawable(Resources.java:1725)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
... 29 more
Caused by: java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
... 33 more
android.content.res.Resources$NotFoundException: File res/drawable/selector_edittext.xml from drawable resource ID #0x7f0200c4
at android.content.res.Resources.loadDrawable(Resources.java:1725)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
at android.widget.EditText.<init>(EditText.java:51)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
... 33 more
java.lang.NullPointerException
at android.graphics.drawable.DrawableContainer$DrawableContainerState.addChild(DrawableContainer.java:349)
at android.graphics.drawable.StateListDrawable$StateListState.addStateSet(StateListDrawable.java:265)
at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:796)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:737)
at android.content.res.Resources.loadDrawable(Resources.java:1722)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1901)
at android.widget.TextView.<init>(TextView.java:440)
at android.widget.EditText.<init>(EditText.java:55)
at android.widget.EditText.<init>(EditText.java:51)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:853)
at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:262)
at net.aviascanner.aviascanner.ui.activities.GetCitiesActivity.onCreate(GetCitiesActivity.java:115)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3905)
at android.app.ActivityThread.access$2600(ActivityThread.java:129)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2121)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4717)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
I have found this error in my application also. In my application I solved my problem by making the copies of the drawables in all the folders of the drawables i.e. drawable-ldpi, drawable-mdpi, drawable-hdpi, drawable-xhdpi. This works correctly in my application. Hope this will solve your problem if u have not kept the drawables into all the provided drawable folders.

without inserting the entire project code how to call classes from one project into another project in android

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);

Categories

Resources