Home > Mobile >  Android Studio use baidu map navigation function of the SDK, unable to get the navigation View
Android Studio use baidu map navigation function of the SDK, unable to get the navigation View

Time:09-21

The 2020-03-06 16:14:32. 013, 2296-2296/com. Example. Arnavigation E/AndroidRuntime: FATAL EXCEPTION: the main
Process: com. Example. Arnavigation, PID: 2296
Java. Lang. NullPointerException: Attempt to invoke virtual method 'android. View. The view of the android. View. The view. The findViewById (int)' on a null object reference
At com.baidu.platform.com API. Walknavi. G.A.G (WalkUIController. Java: 849)
At com.baidu.platform.com API. Walknavi. G.A.H (WalkUIController. Java: 869)
At com.baidu.platform.com API. Walknavi. G.a. & lt; init> (WalkUIController. Java: 352)
At com.baidu.platform.com API. Walknavi. B.b (WNavigator. Java: 585)
At com. Baidu. Mapapi. Walknavi. Controllers. A.A.A (WalkNaviManager. Java: 189)
At com. Baidu. Mapapi. Walknavi. WalkNavigateHelper. OnCreate (WalkNavigateHelper. Java: 344)
At com. Example. Arnavigation. MainActivity $1 $1. OnRoutePlanSuccess (MainActivity. Java: 178)
At com. Baidu. Mapapi. Walknavi. Controllers. A.C.B (WalkNaviManager. Java: 425)
At com.baidu.platform.com API. Wnplatform. J.E.H andleMessage (WRoutePlaner. Java: 116)
An android. OS. Handler. DispatchMessage (Handler. Java: 107)
. An android OS. Stars. Loop (214). Which Java:
. An android app. ActivityThread. Main (7682) ActivityThread. Java:
The at Java. Lang. Reflect. Method. Invoke (Native Method)
At com. Android. Internal. OS. RuntimeInit $MethodAndArgsCaller. Run (516) RuntimeInit. Java:
At com. Android. Internal. OS. ZygoteInit. Main (ZygoteInit. Java: 950)
This is the error information, according to the format of the website to write code, don't know what's the problem

CodePudding user response:

The findViewById found no object, you see if your id has a problem, look for, are generally of low-level error
  • Related