开发者

getting following warning in android application [closed]

开发者 https://www.devze.com 2023-03-21 02:01 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I am developing an android application in which i have to remove the warnings,But when i try to run the code following warnings are generated,Can anyone help me

07-19 12:17:16.681: WARN/ImageView(4551): android.content.res.Resources$NotFoundException: Resource ID #0xffffffff
07-19 12:17:16.681: WARN/ImageView(4551):     at android.content.res.Resources.getValue(Resources.java:892)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.content.res.Resources.getDrawable(Resources.java:580)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.widget.ImageView.resolveUri(ImageView.java:489)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.widget.ImageView.onMeasure(ImageView.java:592)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.view.View.measure(View.java:8171)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:578)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:362)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.view.View.measure(View.java:8171)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.widget.ListView.setupChild(ListView.java:1878)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.widget.ListView.makeAndAddView(ListView.java:1805)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.widget.ListView.fillSpecific(ListView.java:1347)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.widget.ListView.layoutChildren(ListView.java:1633)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.widget.AbsListView.onLayout(AbsListView.java:1280)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.view.View.layout(View.java:7035)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
07-19 12:17:16.681: WARN/ImageV开发者_开发知识库iew(4551):     at android.view.View.layout(View.java:7035)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1249)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1125)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.widget.LinearLayout.onLayout(LinearLayout.java:1042)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.view.View.layout(View.java:7035)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.view.View.layout(View.java:7035)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.view.ViewRoot.performTraversals(ViewRoot.java:1045)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.os.Handler.dispatchMessage(Handler.java:99)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.os.Looper.loop(Looper.java:123)
07-19 12:17:16.681: WARN/ImageView(4551):     at android.app.ActivityThread.main(ActivityThread.java:4633)
07-19 12:17:16.681: WARN/ImageView(4551):     at java.lang.reflect.Method.invokeNative(Native Method)
07-19 12:17:16.681: WARN/ImageView(4551):     at java.lang.reflect.Method.invoke(Method.java:521)
07-19 12:17:16.681: WARN/ImageView(4551):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
07-19 12:17:16.681: WARN/ImageView(4551):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
07-19 12:17:16.681: WARN/ImageView(4551):     at dalvik.system.NativeStart.main(Native Method)

Thanks in advance


Looks like you are trying to grab a resource with the same value as WHITE in ARGB! Check for any lines of code where you are trying to directly grab a colour value as a resource (in this case 0xFFFFFFFF) where it should be referenced as R.color.[your-colour]. I'm guessing this issue is most likely in a piece of code that tries to set the background of a view (receiving an int and hence looking for a resource).

0

精彩评论

暂无评论...
验证码 换一张
取 消