本机映射不能在我的手机中运行android

时间:2017-12-12 10:29:45

标签: android google-maps codenameone

我正在开发一个简单的应用程序,代号为netbeans,并且在模拟器上一切正常,但地图在我的手机安卓中根本没有显示... 我按照我发现的关于这个主题的所有说明(构建提示没问题,API KEY没问题等),但它仍然不起作用...... 有没有人可以告诉我,如果我错过了什么?

    //add the map to the form 
    cnt = new MapContainer(HTML_API_KEY);
    formTUTTO.addComponent(cnt);

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

使用“google”一词过滤这些是我从手机上启动应用时出现的日志行:

12-15 20:09:09.749:W / BroadcastQueue(839):权限拒绝:从com.android.launcher3广播Intent {act = com.android.launcher3.action.LAUNCH flg = 0x10(有额外内容)} (pid = 2776,uid = 10019)需要com.google.android.launcher.permission.RECEIVE_LAUNCH_BROADCASTS,因为接收者com.google.android.googlequicksearchbox / com.google.android.apps.gsa.search.core.icingsync.ApplicationLaunchReceiver < / p>

12-15 20:09:09.749:W / BroadcastQueue(839):权限拒绝:从com.android.launcher3广播Intent {act = com.android.launcher3.action.LAUNCH flg = 0x10(有额外内容)} (pid = 2776,uid = 10019)需要com.google.android.launcher.permission.RECEIVE_LAUNCH_BROADCASTS,因为收件人com.google.android.gms / .icing.proxy.ApplicationLauncherReceiver

12-15 20:09:09.750:W / BroadcastQueue(839):权限拒绝:向com.google.android接收Intent {act = com.android.launcher3.action.LAUNCH flg = 0x10(有额外内容)} .gms / .chimera.GmsIntentOperationService $ GmsExternalReceiver需要com.android.launcher3.permission.RECEIVE_LAUNCH_BROADCASTS,因为发件人com.android.launcher3(uid 10019)

12-15 20:09:11.270:W / System(1983):ClassLoader引用了未知路径:/data/data/com.google.android.gms/app_chimera/m/00000031/n/armeabi

12-15 20:09:11.461:I / Google Maps Android API(1983):Google Play服务客户端版本:9452000

12-15 20:09:11.487:I / Google Maps Android API(1983):Google Play服务包版本:11951436

12-15 20:09:12.143:I / Google Maps Android API(1983):Google Play服务包版本:11951436

12-15 20:09:14.154:W / DynamiteModule(1983):找不到com.google.android.gms.googlecertificates的本地模块描述符类。

12-15 20:09:14.155:W / DynamiteModule(1983):无法通过V2加载模块:java.lang.ClassNotFoundException:未找到类“com.google.android.gms.dynamite.DynamiteModule $ “路径上的DynamiteLoaderClassLoader”:DexPathList [[zip文件“/data/app/com.mycompany.myapp-2/base.apk"],nativeLibraryDirectories=[/data/app/com.mycompany.myapp-2/lib/arm, / vendor / lib,/ system / lib]]

12-15 20:09:14.214:I / DynamiteModule(1983):考虑本地模块com.google.android.gms.googlecertificates:0和远程模块com.google.android.gms.googlecertificates:4

12-15 20:09:14.214:I / DynamiteModule(1983):com.google.android.gms.googlecertificates的选定远程版本,版本&gt; = 4

12-15 20:09:14.255:W / System(1983):ClassLoader引用未知路径:/data/data/com.google.android.gms/app_chimera/m/0000002f/n/armeabi-v7a

12-15 20:09:14.256:W / System(1983):ClassLoader引用未知路径:/data/data/com.google.android.gms/app_chimera/m/0000002f/n/armeabi

12-15 20:09:14.335:W / ConfigurationChimeraPro(2569):来电者无权访问Uri:content://com.google.android.gms.phenotype/com.google.android.gms.clearcut 。公共

2 个答案:

答案 0 :(得分:0)

您似乎使用JavaScript中的API密钥进行原生Android集成。您需要激活native Android和本机iOS SDK,并使用那里提供的密钥。

答案 1 :(得分:0)

Ok, I solved it... It wasn.t a problem of API. I just added this row in my code:

formTUTTO.setLayout(new BorderLayout());

And I added the argument BorderLayout in the following row:

formTUTTO.addComponent(BorderLayout.CENTER,cnt);

Now everything works fine :) CiaoCiao, and thanks for the help...