小编Yan*_*007的帖子

Telegram API release.keystore错误

我尝试在Android Studio的Telegram API中编写一些代码,但首先我只填写了BuildVars(readme.txt说我必须这样做).然后运行Projekt而不是出现这个错误:

Error:A problem was found with the configuration of task ':TMessagesProj:packageDebug'.
> File 'C:\Users\yanni\Desktop\Telegram-master\TMessagesProj\config\release.keystore' specified for property 'signingConfig.storeFile' does not exist.
Run Code Online (Sandbox Code Playgroud)

我尝试了所有的东西,但它不起作用.即使我使用构建签名APK选项(来自Android Studio)并将其安装在我的手机上,APP也会立即关闭.为什么?请帮帮我,抱歉我的英文:D.

BUILDVARS:

package org.telegram.messenger;

public class BuildVars {
    public static boolean DEBUG_VERSION = false;
    public static int BUILD_VERSION = 695;
    public static int APP_ID = *****; //obtain your own APP_ID at https://core.telegram.org/api/obtaining_api_id
    public static String APP_HASH = "**********"; //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"; …
Run Code Online (Sandbox Code Playgroud)

api android keystore gradle telegram

6
推荐指数
1
解决办法
2256
查看次数

争论这是行不通的。[必填:“ android.content.context”

我用这个:

actionBar.setBackgroundColor(ContextCompat.getColor(this, R.color.action_bar));
Run Code Online (Sandbox Code Playgroud)

要使用color.xml中的颜色。

它很好用,但是在某些代码中它说:

Wrong 1st argument type. Found: 'org.telegram.ui.ActionBar.BaseFragment', required: 'android.content.Context'
Run Code Online (Sandbox Code Playgroud)

但是我导入android.content.Context:

import android.content.Context;
Run Code Online (Sandbox Code Playgroud)

我尝试使用而不是'this':

actionBar.setBackgroundColor(ContextCompat.getColor(context, R.color.action_bar));
Run Code Online (Sandbox Code Playgroud)

但是比Android Studio说的要多:

Cannot resolve symbol 'context'
Run Code Online (Sandbox Code Playgroud)

android android-context

1
推荐指数
1
解决办法
1万
查看次数

标签 统计

android ×2

android-context ×1

api ×1

gradle ×1

keystore ×1

telegram ×1