whitespace COMPANY whitespace SERVICES whitespace PRODUCTS whitespace PURCHASE whitespace SUPPORT whitespace CONTACTS whitespace Home whitespace Contact Us whitespace Site Map whitespace
whitespace
SUPPORT
whitespace
FORUM
whitespace
FAQS
whitespace
SUBSCRIPTION
whitespace
REQUEST ON-LINE
whitespace
whitespace

Technical Support Forum

Welcome Guest Search | Active Topics | Log In | Register

No Resource Found 'chart' in xml Options · View
regulatre
#1 Posted : Tuesday, February 08, 2011 2:24:31 AM
Rank: Member

Groups: Registered

Joined: 11/10/2010
Posts: 14
Location: New York

I wrote a very small test app with an aiChart and it works fine, but in my new project I keep running into this error in the layout xml:

error: Error: No resource found that matches the given name (at 'chart' with value '@xml/shortchart').

Which is totally incorrect because there is an xml resource called shortchart.xml...

What could be causing this problem???

Thanks!
BH
regulatre
#2 Posted : Tuesday, February 08, 2011 2:26:08 AM
Rank: Member

Groups: Registered

Joined: 11/10/2010
Posts: 14
Location: New York

Complete XML pasted below:

Code:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/llMain"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
   


<!--  This shall display the list of current DTC Codes -->
<HorizontalScrollView
    android:id="@+id/hsvCurrentCodes"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">

    <TextView 
        android:id="@+id/tvCurrentCodes"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:textSize="80sp"
        android:textColor="#00FF00"
        />
</HorizontalScrollView>   

<Button
    android:id="@+id/btnResetCodes"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:text="Reset Codes"
    android:enabled="false"
/>

  <com.artfulbits.aiCharts.ChartView
    android:id="@+id/chartView"
    chart="@xml/shortchart"
    android:background="@android:drawable/alert_dark_frame"
    android:layout_width="fill_parent"
    android:layout_height="60px"/>
   
</LinearLayout>
Baydalka Volodymyr
#3 Posted : Tuesday, February 08, 2011 5:38:00 PM
Rank: Developers Team


Groups: Registered, Administrators

Joined: 7/28/2009
Posts: 447
Hi,

Make sure that ADT (Android Development Tools) generate correct R.java file. Also make sure that shortchart.xml is correct (all tags is closed, etc.)

Best regards,
Volodymyr Baydalka
Andriod development and support team
regulatre
#4 Posted : Wednesday, February 09, 2011 3:20:31 AM
Rank: Member

Groups: Registered

Joined: 11/10/2010
Posts: 14
Location: New York

Thank you. I stared at the code for an hour and finally it occurred to me that my "xml" folder was beneath "layout" whereas it should have been beneath "res".

in other words my folder structure was this:
res -> layout -> xml

But should have been this:
res -> xml

So in fact my shortchart.xml didn't exist as @xml/shortchart so once I moved it up a level, it just worked.

So as I thought the error message was telling me that "chart" didn't exist, it was apparently telling me that "@xml/shortchart" didn't exist, which was true.

Thanks

Quote:
error: Error: No resource found that matches the given name (at 'chart' with value '@xml/shortchart').


Baydalka Volodymyr wrote:
Hi,

Make sure that ADT (Android Development Tools) generate correct R.java file. Also make sure that shortchart.xml is correct (all tags is closed, etc.)

Best regards,

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Company | Services | Practices | Technologies | Career | Contacts | Privacy
© 2005-2016 ArtfulBits. All rights reserved.