错误:(14、45)错误:未封闭的字符文字

时间:2018-07-19 11:38:24

标签: android

编辑后,我在 NEWS_API_KEY 中出现错误

/* Automatically generated file. DO NOT MODIFY */

package com.news.droiddebo.mytimes;

    public final class BuildConfig {
    public static final boolean DEBUG = Boolean.parseBoolean("true");
    public static final String APPLICATION_ID = "com.news.droiddebo.mytimes";
    public static final String BUILD_TYPE = "debug";
    public static final String FLAVOR = "";
    public static final int VERSION_CODE = 5;
    public static final String VERSION_NAME = "2.0";
    // Fields from build type: debug
    public static final String NEWS_API_KEY   ='1da651fa26f34134bb880c82ff7f0541';
    }

1 个答案:

答案 0 :(得分:1)

在初始化String变量时使用double quote (")

public static final String NEWS_API_KEY ="1da651fa26f34134bb880c82ff7f0541";