Android Studio在大多数情况下都可以正常运行,但是我似乎无法使用模拟器。
在部署目标菜单中,称为的仿真器emulator-5556 [DISCONNECTED]
大约每秒出现和消失一次。adb
当我第一次打开运行菜单时,它总是在初始化后约10秒开始。
每当执行此操作时,我似乎都无法在模拟器或自己的手机上运行我的应用程序。模拟器已启动,但该应用程序从未启动。我打开的每个项目都有这个问题。
每当发生问题并且我尝试运行该程序时,都会在运行日志中显示此消息:
Device emulator-5556disconnected, monitoring stopped
Run Code Online (Sandbox Code Playgroud)
我也对该问题进行了截屏。
我发现其他一些线程在讨论用kill-server
and start-server
命令修复断开连接的仿真器的其他问题,因此我尝试了一下,虽然确实可以使问题停止一小会儿,但我在10秒钟后再次开始在菜单中刷新断开连接的仿真器重新打开运行菜单。
有想法该怎么解决这个吗?
我试过了:
adb
,kill-server
然后start-server
gradle
并重新安装我认为这不太可能是与计算机有关的问题,因为我认识到其他几名笔记本电脑完全相同的人也没有遇到此问题。
我运行一个春天测试,但遗憾的是我仍然保持收到此错误
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.2.RELEASE)
2016-11-17 13:28:14.864 INFO 1372 --- [ main] b.c.medclin.boot.daosTest.MedicoDaoTest : Starting MedicoDaoTest on CTA1
46063 …
Run Code Online (Sandbox Code Playgroud) 设置:Spring Boot 应用程序中的 Kotlin 集成测试。
当我使用 IntelliJ 运行测试时,测试工作正常。但是,当我尝试使用 Maven 运行集成测试时:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:integration-test (default) on project myapp: Execution default of goal org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:integration-test failed: There was an error in the forked process
[ERROR] java.lang.NoClassDefFoundError: ch/cypherk/myapp/service/CustomerService
[ERROR] at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
[ERROR] at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3138)
[ERROR] at java.base/java.lang.Class.getConstructor0(Class.java:3343)
[ERROR] at java.base/java.lang.Class.getConstructor(Class.java:2152)
[ERROR] at org.apache.maven.surefire.junit.PojoAndJUnit3Checker.isPojoTest(PojoAndJUnit3Checker.java:51)
...
Run Code Online (Sandbox Code Playgroud)
这很烦人,因为我需要竹子来运行这些该死的东西。
这是一个接口,是的,它已编译, maven 目录中CustomerService
有一个相应的文件,并且 IntelliJ 设置为使用相同的文件。.class
./target
无法完全弄清楚为什么会失败,并且希望获得该插件的一些帮助。
相关摘录自pom.xml
:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:integration-test (default) on project myapp: Execution default …
Run Code Online (Sandbox Code Playgroud) 使用 Maven 3.0.4。
我的任务是为我们的组织提供公司母公司 POM。我的团队将为开发人员在使用此 POM 时遇到的问题或问题提供支持。通常,他们会将构建日志附加到支持请求中。因此,我希望我的公司 POM 能够通过任何构建将公司父级的版本回显到控制台。我正在为此使用 antrun 插件。
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>echo-build-environment</id>
<phase>validate</phase>
<goals><goal>run</goal></goals>
<configuration>
<target>
<echo level="info" message="Maven ${maven.version}" taskname="Version" />
<echo level="info" message="Corporate POMs ${want.the.version.here}" taskname="Version" />
....
</target>
Run Code Online (Sandbox Code Playgroud)
诀窍是,我不知道在公司母公司和构建中使用的 POM 之间可能会有多少 POM 继承的“级别”。我们可以有这样的继承结构:
corporate-parent
team-parent
application-parent
child-module
Run Code Online (Sandbox Code Playgroud)
或者像这样简单:
corporate-parent
a-simple-library
Run Code Online (Sandbox Code Playgroud)
我无法回应,${project.version}
因为这将是当前(子)项目的版本。我无法使用,${project.parent.version}
因为我不知道可能有多少级继承。我尝试定义一个<corporate.pom.version>
属性,硬编码到公司 POM 版本,但是当我发布我的公司 POM 时,发布插件不知道更新该属性(这是有道理的,它不是依赖版本,它只是一个属性,发布版本不知道更新它)。
理想情况下,我希望能够直接通过属性获取特定 POM 的版本,例如${some.groupId.corporate-parent.version}
. 这样的东西存在吗?
如果没有,在发布期间有没有办法使用releaseVersion
正在发布的项目的更新 POM 属性?
我可以恢复到在每次发布之前手动编辑属性的蛮力方式。我的队友不会欣赏这种方法。
我希望我不必编写自定义插件来做一些乍一看似乎并不困难的事情。
我正在使用 Maven 3.2.3。如果文件系统上不存在文件,如何激活配置文件?我已经尝试了以下,但发现<not>
不支持该语法:
<profile>
<id>create-test-mysql-props-file</id>
<activation>
<file>
<not><exists>${basedir}/src/main/myfile</exists></not>
</file>
</activation>
<build>
<plugins>
<!-- Generate mysql datasource properties -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>write-project-properties</goal>
</goals>
<configuration>
<outputFile>
${project.build.outputDirectory}/mysql_datasource.properties
</outputFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Run Code Online (Sandbox Code Playgroud) 我想知道如何在 gridExtra 2.0.0 中执行以前版本中可以执行的操作来更改表格宽度/高度填充,例如:
grid.arrange(tableGrob(mtcars,padding.h=unit(1,"mm"),padding.v=unit(1,"mm")))
Run Code Online (Sandbox Code Playgroud)
(抱歉,我无法测试上面的代码,因为我没有安装旧版本的 gridExtra)
我不想缩小文本,只是想将所有内容收紧在一起,以便表格适合我将其放在 PDF 页面上的位置。
我可以看到“widths”属性在每个条目上都有“+4mm”,但我不知道如何将它们更改为+2mm。
当然,如果有一个我"padding"
可以更改的简单属性,我会更愿意。
我的问题与此类似。
我有一个 Maven 原型项目,想要进行一些进一步的配置。我试过:
${servicelocatorhost}$
和${servicelocatorport}
放入我的.tomcatplugin
文件中。.tomcatplugin
到原型元数据文件中的过滤文件。添加
<requiredProperties>
<requiredProperty key="servicelocatorhost">
<defaultValue>localhost</defaultValue>
</requiredProperty>
<requiredProperty key="servicelocatorport">
<defaultValue>2809</defaultValue>
</requiredProperty>
</requiredProperties>
Run Code Online (Sandbox Code Playgroud)到原型元数据文件。当我构建这个时,我得到
Archetype IT 'basic' failed: Missing required properties in archetype.properties: servicelocatorhost, servicelocatorport
Run Code Online (Sandbox Code Playgroud)
到目前为止,我认为该archetype.properties
文件仅用于create-from-project
但不用于构建原型。我应该将此类文件中的属性和默认值信息加倍吗?
我究竟需要什么才能使这项工作成功?
我有一个角度材料表。当我用 html 包围表格时<div *ngIf="true">
,表格会呈现,但单击标题列时数据不再排序。
以以下示例为例:https : //material.angular.io/components/table/overview#sorting
并修改它,只需添加<div *ngIf="true"> ... </div>
演示此行为。示例位于:https : //stackblitz.com/edit/angular-quzvjv