В основном я написал собственный виджет, который будет отображаться 5 раз на экране, один под другим, с видом на карту справа.У меня работает пользовательский виджет, но когда я пытался отобразить карту, я получил несколько ошибок (см. Ниже)
Я не совсем уверен, где я иду не так: S
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): FATAL EXCEPTION: main
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): java.lang.RuntimeException: Unable to start activity ComponentInfo{Hartford.gps/Hartford.gps.MapCalculations}: android.view.InflateException: Binary XML file line #2: Error inflating class RelitiveLayout
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at android.os.Handler.dispatchMessage(Handler.java:99)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at android.os.Looper.loop(Looper.java:123)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at android.app.ActivityThread.main(ActivityThread.java:3691)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at java.lang.reflect.Method.invokeNative(Native Method)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at java.lang.reflect.Method.invoke(Method.java:507)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at dalvik.system.NativeStart.main(Native Method)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class RelitiveLayout
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at android.view.LayoutInflater.inflate(LayoutInflater.java:386)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at android.app.Activity.setContentView(Activity.java:1657)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at Hartford.gps.MapCalculations.onCreate(MapCalculations.java:18)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): ... 11 more
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): Caused by: java.lang.ClassNotFoundException: android.view.RelitiveLayout in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/Hartford.gps-2.apk]
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at android.view.LayoutInflater.createView(LayoutInflater.java:471)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:549)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
09-06 14:27:49.085: ERROR/AndroidRuntime(28198): ... 19 more
Это файл XML
<?xml version="1.0" encoding="utf-8"?>
<RelitiveLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Hartford.gps.GaugeView
android:id="@+id/gauge"
android:layout_width="160px"
android:layout_height="100px"
android:background="#ffffff"
android:antialias="true"
/>
<Hartford.gps.GaugeView
android:id="@+id/gauge2"
android:layout_width="160px"
android:layout_height="100px"
android:background="#ffffff"
android:antialias="true"
/>
<Hartford.gps.GaugeView
android:id="@+id/gauge3"
android:layout_width="160px"
android:layout_height="100px"
android:background="#ffffff"
android:antialias="true"
/>
<Hartford.gps.GaugeView
android:id="@+id/gauge4"
android:layout_width="160px"
android:layout_height="100px"
android:background="#ffffff"
android:antialias="true"
/>
<Hartford.gps.GaugeView
android:id="@+id/gauge5"
android:layout_width="160px"
android:layout_height="100px"
android:background="#ffffff"
android:antialias="true"
/>
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="false"
android:apiKey="0xO7eqfjJxqq5P_yfuU0_Wdi7Q4xPfRi95B_AYw"
/>
</RelitiveLayout>