I've been working on a map application and I've run into some issues. Can anyone help me figure out what's wrong with my code?
ERROR
10-25 01:37:41.296 28673-28673/com.onemap.activities E/AndroidRuntime: FATAL EXCEPTION: main
10-25 01:37:41.296 28673-28673/com.onemap.activities E/AndroidRuntime: Process: com.onemap.activities, PID: 28673
10-25 01:37:41.296 28673-28673/com.onemap.activities E/AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.onemap.activities/com.onemap.activities.OneMap}: android.view.InflateException: Binary XML file line #7: Error inflating class android.widget.TextView
...
ONEMAP.java
The issue seems to be at setContentView(R.layout.onemap);
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.onemap);
AppUtilities.init(this);
favDB = new FavouritesDBHandler(AppUtilities.getContext());
this.scrollView = (SlidingMenu) findViewById(R.id.mScrollView);
View mainContent = this.scrollView.getMainContent();
OnClickListener clickListener = getClickListener();
OnLongClickListener longClickListener = getLongClickListener();
...
}
MAINMENU.java
The error appears to be at
inflater.inflate(R.layout.menu_main, rl);
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = super.onCreateView(inflater, container, savedInstanceState);
RelativeLayout rl = (RelativeLayout) v.findViewById(R.id.menu_content);
inflater.inflate(R.layout.menu_main, rl);
...
}
Here is an excerpt from my XML File:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.onemap.widgets.MapView
xmlns:callout="http://schemas.android.com/apk/res/com.onemap.activities"
android:id="@id/mMapView"
calloutStyle="@xml/callout_style"
initExtent="29454.233386372267 39831.55546813806 30038.01821247406 40758.313879574656"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
callout:layout="@layout/callout" />
...
</RelativeLayout>