I make the jar library in my code successfully, but in my xml file it calls
06-08 18:55:23.715: E/AndroidRuntime(13218): java.lang.RuntimeException: Unable to start activity ComponentInfo: android.view.InflateException: Binary XML file line #6: Error inflating class android.jar.com.jjoe64.graphview.BarGraphView
exception.
And the jar file is here github-jjoe64/GraphView
06-08 19:46:22.023: E/AndroidRuntime(19764): FATAL EXCEPTION: main
06-08 19:46:22.023: E/AndroidRuntime(19764): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.zxl.Timetable/com.zxl.Timetable.ui.CurriculumAllInfo}: android.view.InflateException: Binary XML file line #6: Error inflating class com.jjoe64.graphview.BarGraphView
06-08 19:46:22.023: E/AndroidRuntime(19764): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2307)
06-08 19:46:22.023: E/AndroidRuntime(19764): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2357)
06-08 19:46:22.023: E/AndroidRuntime(19764): at android.app.ActivityThread.access$600(ActivityThread.java:153)
06-08 19:46:22.023: E/AndroidRuntime(19764): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247)
06-08 19:46:22.023: E/AndroidRuntime(19764): at android.os.Handler.dispatchMessage(Handler.java:99)
06-08 19:46:22.023: E/AndroidRuntime(19764): at android.os.Looper.loop(Looper.java:137)
06-08 19:46:22.023: E/AndroidRuntime(19764): at android.app.ActivityThread.main(ActivityThread.java:5226)
06-08 19:46:22.023: E/AndroidRuntime(19764): at java.lang.reflect.Method.invokeNative(Native Method)
06-08 19:46:22.023: E/AndroidRuntime(19764): at java.lang.reflect.Method.invoke(Method.java:511)
06-08 19:46:22.023: E/AndroidRuntime(19764): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
06-08 19:46:22.023: E/AndroidRuntime(19764): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
06-08 19:46:22.023: E/AndroidRuntime(19764): at dalvik.system.NativeStart.main(Native Method)
06-08 19:46:22.023: E/AndroidRuntime(19764): Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class com.jjoe64.graphview.BarGraphView
06-08 19:46:22.023: E/AndroidRuntime(19764): at android.view.LayoutInflater.createView(LayoutInflater.java:596)
06-08 19:46:22.023: E/AndroidRuntime(19764): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
06-08 19:46:22.023: E/AndroidRuntime(19764): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
06-08 19:46:22.023: E/AndroidRuntime(19764): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
06-08 19:46:22.023: E/AndroidRuntime(19764): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
06-08 19:46:22.023: E/AndroidRuntime(19764): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
06-08 19:46:22.023: E/AndroidRuntime(19764): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
06-08 19:46:22.023: E/AndroidRuntime(19764): at android.app.Activity.setContentView(Activity.java:1881)
06-08 19:46:22.023: E/AndroidRuntime(19764): at com.zxl.Timetable.ui.CurriculumAllInfo.onCreate(CurriculumAllInfo.java:39)
06-08 19:46:22.023: E/AndroidRuntime(19764): at android.app.Activity.performCreate(Activity.java:5104)
06-08 19:46:22.023: E/AndroidRuntime(19764): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
06-08 19:46:22.023: E/AndroidRuntime(19764): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2261)
06-08 19:46:22.023: E/AndroidRuntime(19764): ... 11 more
06-08 19:46:22.023: E/AndroidRuntime(19764): Caused by: java.lang.NoSuchMethodException: <init> [class android.content.Context, interface android.util.AttributeSet]
06-08 19:46:22.023: E/AndroidRuntime(19764): at java.lang.Class.getConstructorOrMethod(Class.java:460)
06-08 19:46:22.023: E/AndroidRuntime(19764): at java.lang.Class.getConstructor(Class.java:431)
06-08 19:46:22.023: E/AndroidRuntime(19764): at android.view.LayoutInflater.createView(LayoutInflater.java:561)
06-08 19:46:22.023: E/AndroidRuntime(19764): ... 22 more
#jjoe64
create a folder
libs
in your project and add that jar file in it
Right Click that jar file
-->Build path-->Add to Build Path
The View that you are trying to use in the layout file needs to implement the two-parameter constructor that takes a Context and an AttributeSet, as that is the constructor used by the layout inflater. Your View does not, and hence it cannot be used in a layout XML resource.
Related
I am getting VerifyError for method calling of paticular class Utility ,first it was working properly and suddenly its started giving run time error, it is working fine with API lollipop and higher API , Here is my error logs.
06-08 12:25:07.655: E/AndroidRuntime(18117): FATAL EXCEPTION: main
06-08 12:25:07.655: E/AndroidRuntime(18117): java.lang.VerifyError: com/package/projectname/utility/Utility
06-08 12:25:07.655: E/AndroidRuntime(18117): at com.package.projectname.AppDelegate.onCreate(AppDelegate.java:36)
06-08 12:25:07.655: E/AndroidRuntime(18117): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1017)
06-08 12:25:07.655: E/AndroidRuntime(18117): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4575)
06-08 12:25:07.655: E/AndroidRuntime(18117): at android.app.ActivityThread.access$1400(ActivityThread.java:153)
06-08 12:25:07.655: E/AndroidRuntime(18117): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1346)
06-08 12:25:07.655: E/AndroidRuntime(18117): at android.os.Handler.dispatchMessage(Handler.java:99)
06-08 12:25:07.655: E/AndroidRuntime(18117): at android.os.Looper.loop(Looper.java:176)
06-08 12:25:07.655: E/AndroidRuntime(18117): at android.app.ActivityThread.main(ActivityThread.java:5302)
06-08 12:25:07.655: E/AndroidRuntime(18117): at java.lang.reflect.Method.invokeNative(Native Method)
06-08 12:25:07.655: E/AndroidRuntime(18117): at java.lang.reflect.Method.invoke(Method.java:511)
06-08 12:25:07.655: E/AndroidRuntime(18117): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
06-08 12:25:07.655: E/AndroidRuntime(18117): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
06-08 12:25:07.655: E/AndroidRuntime(18117): at dalvik.system.NativeStart.main(Native Method)
I solved this error by placing gms library separately:
Before I have used :
compile 'com.google.android.gms:play-services:8.1.0'
That above one line will take care of GCM and all google related libaries.But this one line cause a verifier error.On top of the verifier error you can see some gms related log.
After that I have added separately like this to fix this issue :
compile 'com.google.android.gms:play-services-location:8.1.0'
compile 'com.google.android.gms:play-services-base:8.1.0'
compile 'com.google.android.gms:play-services-analytics:8.1.0'
compile 'com.google.android.gms:play-services-maps:8.1.0'
compile "com.google.android.gms:play-services-gcm:8.1.0' // for gcm push notification
and also Check this
I have google plus login working fine on devices > 4.1 but some devices cause a crash on 4.0
My best guess is that there is a issue(or it is outdated) with google play services installed on the device.
This is the error I get:
java.lang.RuntimeException: Unable to start activity ComponentInfo{me.frankly/me.frankly.view.activity.NewLoginActivity}: android.view.InflateException: Binary XML file line #103: Error inflating class com.google.android.gms.common.SignInButton
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2077)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2104)
at android.app.ActivityThread.access$600(ActivityThread.java:134)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4624)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
at dalvik.system.NativeStart.main(NativeStart.java)
Caused by: android.view.InflateException: Binary XML file line #103: Error inflating class com.google.android.gms.common.SignInButton
at android.view.LayoutInflater.createView(LayoutInflater.java:608)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:682)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:741)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:744)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:744)
at android.view.LayoutInflater.inflate(LayoutInflater.java:491)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:254)
at android.app.Activity.setContentView(Activity.java:1837)
at me.frankly.view.activity.NewLoginActivity.onCreate(NewLoginActivity.java:112)
at android.app.Activity.performCreate(Activity.java:4479)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1050)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2041)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2104)
at android.app.ActivityThread.access$600(ActivityThread.java:134)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4624)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
at dalvik.system.NativeStart.main(NativeStart.java)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Constructor.java)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:588)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:682)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:741)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:744)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:744)
at android.view.LayoutInflater.inflate(LayoutInflater.java:491)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:254)
at android.app.Activity.setContentView(Activity.java:1837)
at me.frankly.view.activity.NewLoginActivity.onCreate(NewLoginActivity.java:112)
at android.app.Activity.performCreate(Activity.java:4479)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1050)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2041)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2104)
at android.app.ActivityThread.access$600(ActivityThread.java:134)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4624)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
at dalvik.system.NativeStart.main(NativeStart.java)
Caused by: java.lang.NoClassDefFoundError: com.google.android.gms.R$drawable
at com.google.android.gms.common.internal.q.b()
at com.google.android.gms.common.internal.q.a()
at com.google.android.gms.common.SignInButton.a()
at com.google.android.gms.common.SignInButton.G()
at com.google.android.gms.common.SignInButton.setStyle()
at com.google.android.gms.common.SignInButton.<init>()
at com.google.android.gms.common.SignInButton.<init>()
at java.lang.reflect.Constructor.constructNative(Constructor.java)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:588)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:682)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:741)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:744)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:744)
at android.view.LayoutInflater.inflate(LayoutInflater.java:491)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:254)
at android.app.Activity.setContentView(Activity.java:1837)
at me.frankly.view.activity.NewLoginActivity.onCreate(NewLoginActivity.java:112)
at android.app.Activity.performCreate(Activity.java:4479)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1050)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2041)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2104)
at android.app.ActivityThread.access$600(ActivityThread.java:134)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4624)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
at dalvik.system.NativeStart.main(NativeStart.java)
Going through your stack traces I noticed
Caused by: java.lang.NoClassDefFoundError: com.google.android.gms.R$drawable
That leads me to assume that you added the jar for the Play Services SDK but didn't add the Android library project and that is why it could not be found. It may also be possibility that you may be using an outdated version of the Play Service SDK.
I suggest viewing CommonsWare solution by clicking here.
I'm currently facing to a glitch from an Galaxy Tab 10.1 2 (GT-P5110) which give me that error, but just on that device. I tried on divers emulators (I use genymotion: Nexus 5-7-10, Galaxy S3-4-5, Galaxy Note 2-3) and devices (Galaxy S -2-3-4, Nexus 5-7).
But just on that Galaxy tab 2 10.1 (GT-P5110) I have this error.
I found this link, but this didn't really help me out to solve that problem.
07-01 11:06:58.832 14227-14227/com.********.********.com E/AndroidRuntime﹕ FATAL EXCEPTION: main
android.view.InflateException: Binary XML file line #36: Error inflating class com.package.fr.views.SofiaLiTextView
at android.view.LayoutInflater.createView(LayoutInflater.java:613)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at com.package.fr.fragments.TestFragment.onCreateView(TestFragment.java:82)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:927)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1467)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:440)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4895)
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:994)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:587)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at com.package.fr.fragments.TestFragment.onCreateView(TestFragment.java:82)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:927)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1467)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:440)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4895)
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:994)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NumberFormatException: Invalid int: "8.0dip"
at java.lang.Integer.invalidInt(Integer.java:138)
at java.lang.Integer.parse(Integer.java:375)
at java.lang.Integer.parseInt(Integer.java:366)
at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:123)
at android.content.res.TypedArray.getInt(TypedArray.java:254)
at android.widget.TextView.<init>(TextView.java:997)
at android.widget.TextView.<init>(TextView.java:562)
at com.package.fr.views.SofiaLiTextView.<init>(SofiaLiTextView.java:55)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:587)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at com.package.fr.fragments.TestFragment.onCreateView(TestFragment.java:82)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:927)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1467)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:440)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4895)
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:994)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
at dalvik.system.NativeStart.main(Native Method)
Apparently this would be a bug from the Samsung's Android like said here
Very frustrating >:)>:)
If you are using android:paddingstart attribute, make sure that your target api level is below 17, else try remove this attribute and run the app. It will work.
I have a problem but could not be found any solution, I use AsyncHttpClient in https://github.com/AsyncHttpClient/async-http-client, I can run my code in API level 10, but not in API level 17. I am getting this error:
11-13 14:36:47.987 13294-13294/com.modilisim.antalyaticaretborsasi E/com.modilisim.antalyaticaretborsasi.view.fragment.ScrollingBultenlerFragment﹕ error occurred while getting daily bultenler
java.util.concurrent.ExecutionException: java.net.ConnectException: http://...
at com.ning.http.client.providers.netty.NettyResponseFuture.abort(NettyResponseFuture.java:328)
at com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:106)
at org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:427)
at org.jboss.netty.channel.DefaultChannelFuture.addListener(DefaultChannelFuture.java:145)
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.doConnect(NettyAsyncHttpProvider.java:1056)
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.execute(NettyAsyncHttpProvider.java:880)
at com.ning.http.client.AsyncHttpClient.executeRequest(AsyncHttpClient.java:521)
at com.ning.http.client.AsyncHttpClient$BoundRequestBuilder.execute(AsyncHttpClient.java:238)
at com.modilisim.antalyaticaretborsasi.presenter.BultenPresenter.getDailyBultenler(BultenPresenter.java:126)
at com.modilisim.antalyaticaretborsasi.presenter.BultenPresenter.getDailyBultenler(BultenPresenter.java:102)
at com.modilisim.antalyaticaretborsasi.view.fragment.ScrollingBultenlerFragment.onCreateView(ScrollingBultenlerFragment.java:51)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:900)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1082)
at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1184)
at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:291)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:676)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:830)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:736)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at com.modilisim.antalyaticaretborsasi.view.fragment.MainFragment.onCreateView(MainFragment.java:42)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:927)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1467)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:570)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1164)
at android.app.Activity.performStart(Activity.java:5114)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2269)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2356)
at android.app.ActivityThread.access$600(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5195)
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:795)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.net.ConnectException: http://...
at com.ning.http.client.providers.netty.NettyConnectListener.operationCom
I am doing a project in a company so I had to hide the urls in the error code above, but urls are working, they are not problem. Any help appreciated, thanks.
I learned that this AsyncHttpClient library is not for Android, so it is not working properly on all versions of Android. There is a library parallel to this library for Android: http://loopj.com/android-async-http/
I have a Galaxy Samsung tab 10.1" Model GT-P7510 OS Version 3.2. I tried to load app on it and it's giving me Layout inflater error. Why is this? Here is what logcat says:
android.view.InflateException: Binary XML file line #12: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:596)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:644)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:669)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:724)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:727)
at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
at android.view.LayoutInflater.inflate(LayoutInflater.java:391)
at android.view.LayoutInflater.inflate(LayoutInflater.java:347)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:245)
at android.app.Activity.setContentView(Activity.java:1786)
at com.businessplan.BusinessPlannerActivity.onCreate(BusinessPlannerActivity.java:64)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1050)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1782)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1834)
at android.app.ActivityThread.access$500(ActivityThread.java:122)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1027)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4126)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
at dalvik.system.NativeStart.main(Native Method)
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:416)
at android.view.LayoutInflater.createView(LayoutInflater.java:576)
android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f020022 a=-1 r=0x7f020022}
at android.content.res.Resources.loadDrawable(Resources.java:1890)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:2462)
at android.view.ViewGroup.<init>(ViewGroup.java:365)
at android.widget.LinearLayout.<init>(LinearLayout.java:156)
at android.widget.LinearLayout.<init>(LinearLayout.java:152)
Probably you have an error in the layout file called here:
android.app.Activity.setContentView(Activity.java:1786) at com.businessplan.BusinessPlannerActivity.onCreate(BusinessPlannerActivity.java:64) at
Please check it yourself, or post it here.
I removed Gen folder and then again clean and build project and the error has gone.
Same, error went away after a clean project and do a rebuild.