CodeNameOne Google Maps

▼魔方 西西 提交于 2019-12-01 13:12:26

问题


I am getting an error when I run a google maps app on an android for codename one. When I run it on the emulator I am getting no error. When I run it on a phone I get.

an internal application error occurred java.lang RuntimeException: waited too long for browser bridge

I think the problem is that I need to add build hints. I can find where to add them but I am not sure what format they should be in. I am also not sure what to add. I think I found a post that said I needed to add android.xapplication= android:value="YOUR KEY"/> android.xpermissions=

But I am not sure what format that looks like in the build hint entry form


回答1:


Yes. You do need to add the android.xapplication build hint so that your API key is provided. You don't need to add the android.xpermissions build hint. It will automatically be added by the library when you build int.

The instructions for build hints are all in the README for the GoogleMaps cn1lib.

The format for the build hint would be Name: "android.xapplication". Value: "<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="YOUR_ANDROID_API_KEY"/>" Use the IDE's UI to place the build hints. Don't try to paste them directly into the properties file.



来源:https://stackoverflow.com/questions/43192913/codenameone-google-maps

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!