android谷歌地图v2继续崩溃gmap lstarts

时间:2017-05-25 14:48:44

标签: java android eclipse google-maps import

请帮助,我的地图视图v2在这段代码

中继续崩溃
 protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  requestWindowFeature(Window.FEATURE_NO_TITLE);
  setContentView(R.layout.activity_map);
  MapsInitializer.initialize(getApplicationContext());

  // Look up the AdView as a resource and load a request.
  AdView mAdView = (AdView) findViewById(R.id.adView);
  AdRequest adRequest = new AdRequest.Builder().build();
  mAdView.loadAd(adRequest);
 // adView.loadAd(new AdRequest());

logcat错误

  

19:34:46 E AndroidRuntime:致命异常:主要   19:34:46 E AndroidRuntime:java.lang.NumberFormatException:无效的双倍:“28°23'50”   19:34:46 E AndroidRuntime:at java.lang.StringToReal.invalidReal(StringToReal.java:63)   19:34:46 E AndroidRuntime:at java.lang.StringToReal.initialParse(StringToReal.java:164)   19:34:46 E AndroidRuntime:at java.lang.StringToReal.parseDouble(StringToReal.java:282)   19:34:46 E AndroidRuntime:at java.lang.Double.parseDouble(Double.java:301)   19:34:46 E AndroidRuntime:at com.m.tnow.CompanyDetails.onClick(CompanyDetails.java:370)   19:34:46 E AndroidRuntime:在android.view.View.performClick(View.java:5201)   19:34:46 E AndroidRuntime:在android.view.View $ PerformClick.run(View.java:21163)   19:34:46 E AndroidRuntime:在android.os.Handler.handleCallback(Handler.java:746)   19:34:46 E AndroidRuntime:在android.os.Handler.dispatchMessage(Handler.java:95)   19:34:46 E AndroidRuntime:在android.os.Looper.loop(Looper.java:148)   19:34:46 E AndroidRuntime:在android.app.ActivityThread.main(ActivityThread.java:5443)   19:34:46 E AndroidRuntime:at java.lang.reflect.Method.invoke(Native Method)   19:34:46 E AndroidRuntime:at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:728)   19:34:46 E AndroidRuntime:at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)

1 个答案:

答案 0 :(得分:0)

如果GooglePlayServices不存在,它会抛出GooglePlayServicesNotAvailableException ..可能是其中一个原因