【问题标题】:Application is crashing when it was installed from Android Studio (only on android 5 and less)从 Android Studio 安装应用程序时崩溃(仅在 android 5 及更低版本上)
【发布时间】:2017-05-11 14:29:46
【问题描述】:

应用程序在从 Android Studio 安装时崩溃(仅在 android 5 及更低版本上)。 如果构建是通过 Android Studio 在 Android 6 之后的版本上安装的,则该应用程序可以正常工作。 如果构建是使用 APK 文件(构建 -> 构建 APK)安装的,则该应用在所有受支持的 android 版本上都可以正常运行。

我试过了:

  • 无效的现金/重启;
  • 删除项目并从存储库中导入;
  • 清理项目 -> 重建项目;

请帮帮我!如果您需要更多信息,请告诉我)

日志:

05-11 13:50:57.873 19062-19062/com.erminesoft.ngc E/System: stat file error, path is /data/data/com.google.android.gms/app_chimera/m/00000012/n/arm64-v8a, exception is android.system.ErrnoException: stat failed: ENOENT (No such file or directory)
05-11 13:50:57.918 19062-19062/com.erminesoft.ngc E/MPlugin: Unsupported class: com.mediatek.common.telephony.IOnlyOwnerSimSupport
05-11 13:50:58.545 19062-19062/com.erminesoft.ngc E/UncaughtException: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jivesoftware/smack/tcp/XMPPTCPConnection;
                                                                           at com.erminesoft.ngc.net.XmppManager.<clinit>(XmppManager.java:87)

环境:

  • Android Studio:2.3.1。
  • Gradle:com.android.tools.build:gradle:2.3.1
  • Gradle 版本:3.3
  • compileSdkVersion: 25
  • buildToolsVersion: '25.0.2'
  • minSdkVersion: 19
  • targetSdkVersion:25

【问题讨论】:

  • 您是否开启了 Instant Run?
  • @rciovati 如何查看?
  • @rciovati 我检查了它,Instant Run 在设置中打开了。我试图关闭并打开。但这对我没有帮助......
  • 最终它很有帮助。我不知道为什么它第一次不起作用,但现在一切正常。我可以通过 Android Studio 运行我的项目。
  • 很高兴听到:)

标签: android android-studio


【解决方案1】:

在我的情况下,解决方案是禁用 Instant Run: Preferences -> Build, Execution, Deployment -> 取消勾选“Enable Instant Run to hot swap code/resource changes on deploy”)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-12-01
    相关资源
    最近更新 更多