Today saw Google Maps Android API v2 official website description that can be run directly Case Project : android-sdk \ extras \ google \ google_play_services \ samples \ maps, but imported into Eclipse , and found a lot of red cross , a closer look because com.example.mapdemo.view.FeatureView.java used in the import com.example.mapdemo.R;
R.java file but can not find the whole project , this is not likely to be in another package inside, the additional packages are added .
Then I re-downloaded google play services, the problem persists , you can exclude the problem is to download incomplete .
Please god help locate causes.
------ Solution ---------------------------------------- ----
debug a virtual machine with a real machine have installed google play service cumbersome and more cards
------ Solution ----- ---------------------------------------
which has a link to http: / / www.cnblogs.com/mengdd/archive/2013/01/01/2841390.html which describes in great detail I hope to help you also need to apply for key v2 starting sha1 ; and the package name to generate source code so Google can not directly run
------ Solution ------------------ --------------------------
even have encountered , MainActivity.java in xxx.xxx.xxx.R can not find , or just find R.layout.Activity_main
------ For reference only ---------------------------------- -----
nobody can return their top .
later found R.java not automatically generated , there is multimap_demo.xml error, error-related code is as follows :
android: layout_width = "match_parent"
android: layout_height = "match_parent"
android: layout_weight = "0.5"
class = "com.google.android.gms.maps.SupportMapFragment"
map: cameraTargetLat = "48.85"
map: cameraTargetLng = "2.35"
map: cameraZoom = "8" />
Tip cameraTargetLat, cameraTargetLng and cameraZoom not recognize , obviously is the official website to download something , but also wrong, I do not know why.
Later, these three things removed, becomes:
android: layout_width = "match_parent"
android: layout_height = "match_parent"
android: layout_weight = "0.5"
class = "com.google.android.gms.maps.SupportMapFragment" />
I was not wrong , and can not run on the unknown.
------ For reference only -------------------------------------- -
4 floor how to solve ah
没有评论:
发表评论