简体   繁体   English

Android Studio和Google Maps API片段崩溃

[英]Android Studio and Google Maps API fragment Crash

I want to create a google map but I have a problem with it. 我想创建一个谷歌地图,但是我有一个问题。 It crashes when I start it, I also created that API Key and inserted in "YOUR_KEY_HERE" but it still doesn't work. 启动它时会崩溃,我也创建了该API密钥并将其插入“ YOUR_KEY_HERE”中,但仍然无法使用。 It might be a problem with fragment tag? 片段标签可能有问题吗? I tried to make another application with fragment but it also crashes. 我试图用片段制作另一个应用程序,但是它也崩溃了。 Thank you. 谢谢。 (Android studio 3.1.3) (Android Studio 3.1.3)

I believe that we were having the same issue. 我认为我们遇到了同样的问题。 I would launch a clean version of a Google Maps Activity, go grab a new API Key, and run the application. 我将启动一个干净的Google Maps Activity版本,获取一个新的API密钥,然后运行该应用程序。 When I did this, it would pop up then immediately crash. 当我这样做时,它会弹出然后立即崩溃。 I had to go into my Manifest and add <uses-library android:name="org.apache.http.legacy" android:required="false"/> in the application Section to resolve this issue. 我必须进入清单并在应用程序部分中添加<uses-library android:name="org.apache.http.legacy" android:required="false"/>才能解决此问题。

Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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