我有一个InstrumentedTest
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext(String groupName) {
Context appContext = InstrumentationRegistry.getTargetContext();
UiDevice device=UiDevice.getInstance(getInstrumentation());
...
...
}
}
Run Code Online (Sandbox Code Playgroud)
我想用adb shell
命令执行它.但我要传递groupName
方法的参数值useAppContext(String groupName)
我正在使用命令
adb shell am instrument -w -r -e debug false -e class 'com.<package_name>.ExampleInstrumentedTest' com.<package_name>.test/android.support.test.runner.AndroidJUnitRunner
Run Code Online (Sandbox Code Playgroud)
但是如何将方法参数作为参数传递给在命令提示符下运行的命令?
我正在创建一个新flutter
项目Android studio
。我为项目命名并选择Flutter
应用程序。然后我点击完成,然后注意到发生了。Android工作室说
"Flutter create command was unsuccessful"
Run Code Online (Sandbox Code Playgroud)
当我使用文件资源管理器导航到命令目录时,我使用我提供的项目名称创建了新文件夹,但它是空的。
请帮忙。
我已经创建了一个react-native
应用程序VS Code
并尝试在设置配置后运行它launch.json
"version": "0.2.0",
"configurations": [
{
"name": "Debug Android",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "android",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
}
]
Run Code Online (Sandbox Code Playgroud)
我已将设备连接到 PC,在设置配置后,我按了 F5,但 IDE 抛出错误说
Error while executing command 'react-native.cmd run-android --no-packager' (error code 101)
Run Code Online (Sandbox Code Playgroud)
请帮我解决这个问题。如果您需要有关该问题的更多详细信息,请告诉我。
android react-native visual-studio-code react-native-android