简体   繁体   中英

run time error Could Not Find Class com.google.android.gms.maps.SupportMapFragment

I know this question has been asked before in several post, but I've tried everything and none of them solved my problem. I'm trying on an app that uses Google Maps v2 API to display a map. the project is compiled without error, but it crashes at run time on the device with this error in LogCat :

Could not find class 'com.google.android.gms.maps.SupportMapFragment'

as I Checked :

1- Last version of Google Service is installed on the device.

2- google-play-services_lib project is under same folder as referencing project and it is currectly added to project as Library (as below) :

在此处输入图片说明

3- Google service library is shown under Android dependencies :

4- I decompiled the project's apk and surprisingly in the 'classes' folder I saw gms folder without map folder and without SupportMapFragment class : 在此处输入图片说明

5- I added the lib to build path :

在此处输入图片说明

I would be very grateful if anyone could give an idea to solve my problem.

You need to add the library to the classpath.

For that just right click the library file in the package explorer of eclipse and select add to build path.

Then clean and rebuild and everything should be fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM