【问题标题】:My App is working in Emulator but NOT in real device我的应用程序在模拟器中运行但不在真实设备中
【发布时间】:2015-09-08 04:00:25
【问题描述】:

我使用的是 Android Studio 1.2.2 版本。我从一开始就在 API 18 版本中创建了我的 android 应用程序。在我的应用程序中,谷歌地图起着重要作用。

在我的 SDK 管理器中,他们没有为 Google API x86 下载 API 级别 17 和 18 的选项。所以我下载了 Google APIs 19 (x86) 版本。它在模拟器中运行良好,但在 Lallipop 5 版本的真实设备中运行良好。

我的应用构建等级:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "22.0.1"

lintOptions {
    checkReleaseBuilds false
    abortOnError false
}
defaultConfig {
    applicationId "com.example.bharat.plantnow"
    minSdkVersion 16
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    // multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:7.8.0'
compile 'com.google.android.gms:play-services-maps:7.8.0'
compile 'com.android.support:appcompat-v7:23.0.0'

}

【问题讨论】:

  • 什么不起作用?有任何错误信息吗?
  • 将手机连接到电脑,打开监视器,只过滤到您的应用程序的输出,然后给我们它抛出的错误。
  • 你是如何在手机上安装应用程序的?
  • 您无法将您的设备连接到工作室 r 无法在设备中运行您的应用程序吗?
  • 您是否启用了您的设备开发模式?

标签: android google-maps-api-3 android-emulator


【解决方案1】:

GoogleMap 无法显示,因为您在使用 Emulator 时有一个构建版本,而在生成 .apk 文件时您有另一个构建版本。 查看文档:http://tools.android.com/tech-docs/new-build-system/user-guide

【讨论】:

    猜你喜欢
    • 2018-10-23
    • 2014-09-01
    • 1970-01-01
    • 1970-01-01
    • 2022-10-02
    • 2016-09-02
    • 1970-01-01
    • 2017-05-01
    • 1970-01-01
    相关资源
    最近更新 更多