문제

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
도움이 되었습니까?

해결책

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!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top