在更新谷歌播放服务后,应用程序不会在非4.4设备上构建

Whi*_*ura 9 android google-play-services

我刚刚将我的google play服务lib更新为:

compile 'com.google.android.gms:play-services:4.1.32'
Run Code Online (Sandbox Code Playgroud)

我的build.gradle文件中有以下内容(编译SDK版本将在下一次更新;我正在使用应用程序进行大量更新)

compileSdkVersion "Google Inc.:Google APIs:17"
buildToolsVersion "19.0.1"

defaultConfig {
    minSdkVersion 14
    targetSdkVersion 19
}
Run Code Online (Sandbox Code Playgroud)

每次我在任何非nexus设备上构建应用程序时,我都会看到应用程序安装,但它不会打开(没有ANR;它只是关闭).

以下是我认为可能导致此问题的一些输出:

02-14 19:46:19.608    2286-2816/? W/ActivityManager? Permission denied: checkComponentPermission() owningUid=10134


I/ActivityManager? Process com.xxx.xxx (pid 23606) (adj 0) has died.
E/Launcher? Error finding setting, default accessibility to not found: accessibility_enabled
Run Code Online (Sandbox Code Playgroud)

Sea*_*eau 7

我会首先尝试降级Google Play服务版本build.gradle,看看该应用是否仍适用于旧版本.

然后,请确保您为最新版本的Google Play服务和Google Repository更新Android SDK,然后再次尝试升级.

我还建议你使用最新版本的Android Gradle插件build.gradle(例如com.android.tools.build:gradle:1.0.0)

最后,我还建议尝试在命令行上构建和安装,gradlew clean installDebug以消除Android Studio的潜在问题(请注意,您需要手动或通过ADB命令启动主Activity adb shell am start -n com.xxxx.xxxx/.YourMainActivity,因为installDebug不会自动启动活动).