gpt4 book ai didi

android - 运行 Telegram-master 项目时找不到包名 org.telegram.messenger.beta 的匹配客户端(从 gi​​tHub 下载))

转载 作者:行者123 更新时间:2023-11-29 19:27:02 27 4
gpt4 key购买 nike

引用此处询问的 Telegram 集成 My Previous Question , 我已经从 GitHub GitHub Link 将 Telegram 主项目源代码导入到我的 Android Studio IDE 中

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

如telegram官网所述,部分文件发生变化。APP_ID 和 APP_HASH 已更新为我的 Telegram 帐户联系电话。

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 文件(从此处下载link)这样做时,我将应用程序名称命名为 TMessagesProj,将程序包名称命名为 com.telegram。我在问 SHA key 。

生成 Keystorefile.jks 后,我从命令提示符中获得了 SHA1 key 。最后,我获得了 google-servives.json

google-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 所示的错误  figure 2.

有人可以告诉我哪里出错了吗?下载json文件时给包名有错吗??

最佳答案

填充文件BuildVars.java

选项卡 BuildsVariants 编辑 armv7Debug -> armv7Release

enter image description here

关于android - 运行 Telegram-master 项目时找不到包名 org.telegram.messenger.beta 的匹配客户端(从 gi​​tHub 下载)),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41101570/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com