0

help please , my map view v2 keep crashing on startup whats wrong in this code

 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 error

19:34:46 E AndroidRuntime : FATAL EXCEPTION: main 19:34:46 E AndroidRuntime : java.lang.NumberFormatException: Invalid double: "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 : at android.view.View.performClick(View.java:5201) 19:34:46 E AndroidRuntime : at android.view.View$PerformClick.run(View.java:21163) 19:34:46 E AndroidRuntime : at android.os.Handler.handleCallback(Handler.java:746) 19:34:46 E AndroidRuntime : at android.os.Handler.dispatchMessage(Handler.java:95) 19:34:46 E AndroidRuntime : at android.os.Looper.loop(Looper.java:148) 19:34:46 E AndroidRuntime : at 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)

alessandrio
  • 4,282
  • 2
  • 29
  • 40
sally
  • 11
  • 6

1 Answers1

0

it throws GooglePlayServicesNotAvailableException if GooglePlayServices not present.. may be one of the reason

Anuj Jindal
  • 1,711
  • 15
  • 24
  • i have include google play service jar in project libraries already, and in app manifest ,but it keeping crashing – sally May 25 '17 at 15:12
  • check in the device where it has play services version greater than you mentioned in the gradle. https://stackoverflow.com/questions/22493465/check-if-correct-google-play-service-available-unfortunately-application-has-s – Anuj Jindal May 25 '17 at 15:14
  • how to do that in eclipse – sally May 25 '17 at 16:38