/** * Automatically generated file. DO NOT MODIFY */ package com.hui.tally; public final class BuildConfig { public static final boolean DEBUG = Boolean.parseBoolean("true"); public static final String APPLICATION_ID = "com.hui.tally"; public static final String BUILD_TYPE = "debug"; public static final String FLAVOR = ""; public static final int VERSION_CODE = 1; public static final String VERSION_NAME = "1.0"; }
写的app/build/generated/source/buildConfig/debug/com/hui/tally/BuildConfig.java
下面是Src下面的代码
package com.hui.tally; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.hui.tally", appContext.getPackageName()); } }
标签:Day9,tally,hui,public,开发,static,import,Android,final From: https://www.cnblogs.com/bzsc/p/18044528