Android 应用程序仅在从 Google Play 下载后首次启动时崩溃

Android Applications crashes only on first launch only after downloading from Google Play

如果我使用 apk 文件从 sdcard 安装,我的应用程序工作正常。但是从 google 下载时播放它会因 toast

而崩溃

application shortcut is already available.

它仅在第一次会话时崩溃,错误日志来自 google 播放

java.lang.RuntimeException: Unable to instantiate receiver com.google.ads.InstallReceiver: java.lang.ClassNotFoundException: Didn't find class "com.google.ads.InstallReceiver" on path: DexPathList

等待帮助。提前致谢。

可能是 Admob 问题。删除

<receiver 
  android:name="com.admob.android.ads.analytics.InstallReceiver" 
  android:exported="true"> 
  <intent-filter> 
  <action 
  android:name="com.android.vending.INSTALL_REFERRER" /> 
  </intent-filter> 
</receiver> 

来自您的 Admob 插件清单。确保您的广告在删除后有效。如果问题仍然存在,请删除当前 Admob 插件文件夹并安装来自 here 的最新版本。只需下载一个标题 GoogleMobileAds.unitypackage 并将其导入您的项目。