Question

I am writing an Android 2.3.3 application and testing it on my Samsung S3 handset. I added a custom view to the application for drawing a graph, and now when I try to run the app on my handset, the program immediately crashes (no debug information).

I've isolated the bug to a single line of code in the XML Layout - namely:

android:id="@+id/graph"

I do not have any other views in my project with this Id, so there should not be a conflict there. I am developing using Netbeans 7.2 with NBAndroid plugin on Windows 7 x64 and have not had any prior problems building android applications.

Here is the snippet of code that is causing the crash.

<com.customApp.GraphView
android:id="@+id/graph"
android:layout_width="fill_parent"
android:layout_height="40sp"
/>

Other notes:

  • Changing the id from "graph" to something else doesn't appear to help
Was it helpful?

Solution

I managed to resolve the problem by doing a "build clean" in NetBeans. Project builds and runs as it should now.

My guess is that one of the generated source files was not properly building. Oh well, Thanks for the replies!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top