Android 运行电报主项目(从gitHub下载)时,未找到包名org.telegrame.messenger.beta的匹配客户端

Android 运行电报主项目(从gitHub下载)时,未找到包名org.telegrame.messenger.beta的匹配客户端,android,telegram,Android,Telegram,关于这里询问的电报集成,我已经从GitHub将电报主项目源代码导入到我的Android Studio IDE中 第一次运行后,它显示了所需的google-services.json文件的错误,如图1所示 “模块根文件夹中缺少文件google-services.json。没有该文件,谷歌服务插件无法运行” 电报官方网站上提到的一些文件发生了变化。 应用程序ID和应用程序哈希已更新为收到我的电报帐户联系人号码。 BuildVars.java /* * This is the source code

关于这里询问的电报集成,我已经从GitHub将电报主项目源代码导入到我的Android Studio IDE中

第一次运行后,它显示了所需的google-services.json文件的错误,如图1所示 “模块根文件夹中缺少文件google-services.json。没有该文件,谷歌服务插件无法运行”

电报官方网站上提到的一些文件发生了变化。 应用程序ID和应用程序哈希已更新为收到我的电报帐户联系人号码。

BuildVars.java

/*
 * This is the source code of Telegram for Android v. 3.x.x.
 * It is licensed under GNU GPL v. 2 or later.
 * You should have received a copy of the license in this archive (see LICENSE).
 *
 * Copyright Nikolai Kudashov, 2013-2016.
 */

    package org.telegram.messenger;

    public class BuildVars {
        public static boolean DEBUG_VERSION = false;
        public static int BUILD_VERSION = 851;
        public static String BUILD_VERSION_STRING = "3.13";
        public static int APP_ID = *22**; //obtain your own APP_ID at https://core.telegram.org/api/obtaining_api_id
        public static String APP_HASH = "01a66ec**********ea979**********"; //obtain your own APP_HASH at https://core.telegram.org/api/obtaining_api_id
        public static String HOCKEY_APP_HASH = "your-hockeyapp-api-key-here";
        public static String HOCKEY_APP_HASH_DEBUG = "your-hockeyapp-api-key-here";
        public static String GCM_SENDER_ID = "760348033672";
        public static String SEND_LOGS_EMAIL = "email@gmail.com";
        public static String BING_SEARCH_KEY = ""; //obtain your own KEY at https://www.bing.com/dev/en-us/dev-center
        public static String FOURSQUARE_API_KEY = ""; //obtain your own KEY at https://developer.foursquare.com/
        public static String FOURSQUARE_API_ID = ""; //obtain your own API_ID at https://developer.foursquare.com/
        public static String FOURSQUARE_API_VERSION = "20150326";
    }
下载的google-servives.json文件(从此处下载) 这样做时,我给应用程序命名为TMessagesProj,包名为com.telegram。我在问沙基

在生成keystrefile.jks之后,我从命令提示符下获得了SHA1 Key.,最后,我得到了google-servives.json

谷歌服务.json

{
  "project_info": {
    "project_number": "9063***82727",
    "project_id": "tmessagesproj-767a5"
  },
  "client": [
    {
      "client_info": {
        "mobilesdk_app_id": "1:906349682727:android:31bf726991d01aca",
        "android_client_info": {
          "package_name": "org.telegram"
        }
      },
      "oauth_client": [
        {
          "client_id": "906349682727-vcvhs6liiqgfdfc90vasor1vf9cfsqrp.apps.googleusercontent.com",
          "client_type": 1,
          "android_info": {
            "package_name": "org.telegram",
            "certificate_hash": "11D45CD77CC61E236233BD1A2FB74A0BE1184C15"
          }
        },
        {
          "client_id": "906***682727-n0finerekh0ajii3qr4dqm0rd8fnl4ck.apps.googleusercontent.com",
          "client_type": 3
        }
      ],
      "api_key": [
        {
          "current_key": "AIzaSyAqyKxdPU4mcDElWWHnJXuOwTtz_JP****"
        }
      ],
      "services": {
        "analytics_service": {
          "status": 1
        },
        "appinvite_service": {
          "status": 1,
          "other_platform_oauth_client": []
        },
        "ads_service": {
          "status": 1
        }
      }
    }
  ],
  "configuration_version": "1"
}
在应用程序中添加google-services.json文件后,即TMessagesProj,给出错误,如图2所示


有人能告诉我哪里出了问题吗?下载json文件时给出包名是否有错误???

填充BuildVars.java文件

选项卡构建变量编辑armv7Debug->armv7Release


根据多数情况,您可以将您的google-servives.json文件放在app文件夹中。在我的情况下,我将其置于TMessagesProj之下。而且,没有名为“beta”的文件夹。i、 e.在org.telegrame.messenger.beta内