2016-02-11 52 views
1

爲什麼UNKNOW錯誤信息,這裏的地圖我跟所有的步驟 文檔中提供的過程中拋出。註冊開發者控制檯,我使用的是正確的appid,appCode,appApiKey這裏地圖錯誤的Android應用程序未知信息彈出

@Override 
     protected void onCreate(Bundle savedInstanceState) { 
      if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { 
       Window window = getWindow(); 
       window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); 
       window.setStatusBarColor(getResources().getColor(R.color.clr_black)); 
      } 
      super.onCreate(savedInstanceState); 
      setContentView(R.layout.my_location); 
      getSupportActionBar().setDefaultDisplayHomeAsUpEnabled(true); 
      getSupportActionBar().setDisplayHomeAsUpEnabled(true); 
      getSupportActionBar().setElevation(0); 
      // Search for the map fragment to finish setup by calling init(). 
      mapFragment = (MapFragment)getFragmentManager().findFragmentById(R.id.mapfragment); 
      mapFragment.init(new OnEngineInitListener() { 
       @Override 
       public void onEngineInitializationCompleted(OnEngineInitListener.Error error) { 
        if (error == OnEngineInitListener.Error.NONE) { 
         // retrieve a reference of the map from the map fragment 
         map = mapFragment.getMap(); 
         // Set the map center to the Vancouver region (no animation) 
         map.setCenter(new GeoCoordinate(49.196261, -123.004773, 0.0), 
           Map.Animation.NONE); 
         // Set the zoom level to the average between min and max 
         map.setZoomLevel(
           (map.getMaxZoomLevel() + map.getMinZoomLevel())/2); 
        } else { 
         System.out.println("ERROR: Cannot initialize Map Fragment " + error.toString()); 
         Toast.makeText(MyLocation.this, " Error: " + error.toString(), Toast.LENGTH_LONG).show(); 
        } 
       } 
      }); 
     } 

any suggestions. 
+0

粘貼您的日誌文件 – Neha

回答

1

你是哪個設備上的Android版本?目前該SDK不支持Android 6.0,因此在文檔中提到了6.0的工作原理。 https://developer.here.com/mobile-sdks/documentation/android-hybrid-plus/topics/app-simple-android-studio.html 「注:這裏SDK目前不支持Android的目標API級別,如果你的應用程序設置爲API目標23.請確保targetSdkVersion 23.某些功能可能無法設置爲低於22級或23級將得到支持未來的版本。「

+1

這仍然是這樣嗎?如果是的話,那麼6.0版本的SDK允許哪些版本?發佈聲明聲明3.0.1允許Android M支持,但是3.1.1的API更改聲明他們聲稱他們[添加了對Android目標API級別23.'''的支持](https://developer.here.com/documentation /download/maps_android_nlp_hybrid_plus/3.1.1/HERE%20Android%20SDK%20Premium%20Edition%20v3.1.1%20Release%20Notes.pdf) – bkach

+0

這是正確的,從3.1.1版本23 API支持,但權限已到加在跑也是。 https://developer.here.com/mobile-sdks/documentation/android-hybrid-plus/topics/app-simple-android-studio.html –

1

我有完全相同的問題。我使用SDK包中的BasicMapSolution作爲演示應用程序的模板。在我正在部署應用程序的設備上運行Android 4.0.3。 TargetSdkVersion在gradle這個文件設置爲17和compiledSdkVersion設置爲21

爲了解決我與的src/main/jniLibs/armeabi爲src本機庫重命名的文件的問題/主/ jniLibs/armeabi- v7a。 我認爲這在教程中是錯誤的!

現在的「未知」的錯誤不occure了,我可以訪問地圖和初始化。但是地圖永遠不會呈現。我認爲這是一個新的問題(設備特定): -/

相關問題