參照電報集成問這裏My Previous Question不匹配的客戶端,我已經導入了電報主項目源代碼到我的Android Studio IDE中從GitHub的GitHub Link發現包名org.telegram.messenger.beta同時運行的電報主項目(從GitHub下載))
後第一次運行,如圖1所示 「文件谷歌 - services.json,它顯示需要谷歌,services.json文件的錯誤是從模塊根失蹤如果沒有它,Google服務插件就無法運行「。
一些如電報官方網站上提到的文件變化。如收到我的電報賬戶聯繫號碼 的APP_ID & APP_HASH已更新。
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 protected]";
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";
}
下載谷歌,servives.json文件,而這樣做 (從這裏下載link),我給應用程序的名稱爲TMessagesProj &包名稱作爲融爲一體。電報。我在問SHA Key。
產生Keystorefile.jks後,我接到了命令提示符SHA1密鑰。最後,我得到了谷歌,servives.json
谷歌,servives.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文件時提供包名是否有錯誤?
在那裏你可以把你的谷歌,servives.json文件 – Vadivel
根據大多數的應用程序內夾。在我的情況下,我放在TMessagesProj下。而且,沒有這樣的文件夾命名爲「測試版」。即** ** org.telegram.messenger.beta ** –