由于我不是专家,我无法确定下面的错误是 logcat。我正在调用另一个页面onclick
按钮。加载另一个页面时出现错误
setContentView(R.layout.searchm);
下面是源代码和locgcat
Logcat如下
09-09 05:49:46.896: E/AndroidRuntime(2657): FATAL EXCEPTION: main
09-09 05:49:46.896: E/AndroidRuntime(2657): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.androidhive.googlemaps/com.androidhive.googlemaps.SearchActivity}: android.view.InflateException: Binary XML file line #6: Error inflating class CustomAutoCompleteTextView
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.app.ActivityThread.access$600(ActivityThread.java:141)
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.os.Handler.dispatchMessage(Handler.java:99)
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.os.Looper.loop(Looper.java:137)
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.app.ActivityThread.main(ActivityThread.java:5103)
09-09 05:49:46.896: E/AndroidRuntime(2657): at java.lang.reflect.Method.invokeNative(Native Method)
09-09 05:49:46.896: E/AndroidRuntime(2657): at java.lang.reflect.Method.invoke(Method.java:525)
09-09 05:49:46.896: E/AndroidRuntime(2657): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
09-09 05:49:46.896: E/AndroidRuntime(2657): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
09-09 05:49:46.896: E/AndroidRuntime(2657): at dalvik.system.NativeStart.main(Native Method)
09-09 05:49:46.896: E/AndroidRuntime(2657): Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class CustomAutoCompleteTextView
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:707)
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
09-09 05:49:46.896: E/AndroidRuntime(2657): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:267)
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.app.Activity.setContentView(Activity.java:1895)
09-09 05:49:46.896: E/AndroidRuntime(2657): at com.androidhive.googlemaps.SearchActivity.onCreate(SearchActivity.java:26)
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.app.Activity.performCreate(Activity.java:5133)
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
09-09 05:49:46.896: E/AndroidRuntime(2657): ... 11 more
09-09 05:49:46.896: E/AndroidRuntime(2657): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.CustomAutoCompleteTextView" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.androidhive.googlemaps-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.androidhive.googlemaps-2, /vendor/lib, /system/lib]]
09-09 05:49:46.896: E/AndroidRuntime(2657): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
09-09 05:49:46.896: E/AndroidRuntime(2657): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
09-09 05:49:46.896: E/AndroidRuntime(2657): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.view.LayoutInflater.createView(LayoutInflater.java:559)
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:652)
09-09 05:49:46.896: E/AndroidRuntime(2657): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:669)
09-09 05:49:46.896: E/AndroidRuntime(2657): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:694)
09-09 05:49:46.896: E/AndroidRuntime(2657): ... 21 more