Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用常量 BuildConfig.class 运行 Robolectric,但它似乎不适用于 gradle 生成的所有风格。是否有命令让 gradle 为所有人制作这个文件?
BuildConfig 会根据您选择的 Build 风格自动生成。在 Android Studio 中,单击 IDE 窗口左侧的 Build Variants。选择您的构建风格,清理项目,BuildConfig 将根据所选风格生成。
你能显示你的gradle文件吗?