我试图设置DEX任务可以在基于gradle的Android项目中使用的最大内存,但找不到任何选项来执行此操作.
我的动机要做到这一点是因为dex有时需要我的电脑开始交换,并成为一些分钟(所以我宁愿看到任务失败,然后释放一些更多的资源,然后重试)完全没有反应这么多的内存
在我的gradle.propertiesI org.gradle.jvmargs="-Xmx300m"限制Gradle本身使用的内存,但当Gradle启动dx它总是使用-Xmx1024.
那么如何让Gradle限制dx使用的内存?
我在制作PreferenceScreen和applicationIdSuffix合作方面遇到了一些问题.
假设我的应用程序包/ applicationId是com.myapp在摇篮和在AndroidManifest.xml,并且applicationIdSuffix被定义为:
buildTypes {
debug {
applicationIdSuffix '.dev'
}
}
Run Code Online (Sandbox Code Playgroud)
如果我定义PreferenceScreen如下
<PreferenceScreen
android:key="key_about" android:summary="something" android:title="About">
<intent
android:targetClass="com.myapp.activities.AboutActivity"
android:targetPackage="com.myapp" />
</PreferenceScreen>
Run Code Online (Sandbox Code Playgroud)
当启动应用程序的调试版本时,我得到一个例外
java.lang.SecurityException: Permission Denial: starting Intent { (...) } from ProcessRecord{(...)} (pid=13658, uid=10105) not exported from uid 10067
Run Code Online (Sandbox Code Playgroud)
这是有道理的,因为我正在尝试从不同的应用程序启动一个活动.问题是我无法找到一种方法来启动Android正确的活动.
如果我更改targetClass为".activities.AboutActivity",它仍然无法找到该活动
ActivityNotFoundException: Unable to find explicit activity class {com.myapp.dev/.activities.AboutActivity}
Run Code Online (Sandbox Code Playgroud)
我甚至尝试使用正确的包为每个版本定义一个值:
android:targetClass="@string/classname"
android:targetPackage="@string/packagename"
Run Code Online (Sandbox Code Playgroud)
但它找不到合适的活动:
ActivityNotFoundException: Unable to find explicit activity class
{com.myapp.dev/com.myapp.dev.activities.AboutActivity};
have you declared this activity in …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用Play Gradle插件来编译/打包使用Ebean的Play 2.3.x应用程序.
在编译和打包过程中一切正常,但是当我运行应用程序时,我得到了众所周知的错误
Entity type class SomeEntity is not an enhanced entity bean.
Subclassing is not longer supported in Ebean
Run Code Online (Sandbox Code Playgroud)
那么如何在编译期间让Gradle运行增强器呢?
我在Play Framework 2.3.6 Java项目中使用MyBatis 3.2.8.我已经挣扎了几天,迭代遍历复杂对象参数中的MyBatis映射器的整数列表.这是我的设置:
我在EventFilter.java中有一个名为EventFilter的类:
public class EventFilter {
private String beginDate;
private String endDate;
private List<Integer> closestCountry;
private List<Integer> territorialWaterStatus;
private List<Integer> vesselCountry;
private String closestCountryInClause;
private String territorialWaterStatusInClause;
private String vesselCountryInClause;
public EventFilter() { }
public EventFilter(JsonNode jsonNode){
this.beginDate = jsonNode.get("beginDate").asText();
this.endDate = jsonNode.get("endDate").asText();
this.closestCountry = JsonHelper.arrayNodeToIntegerList((ArrayNode) jsonNode.get("closestCountry"));
this.territorialWaterStatus = JsonHelper.arrayNodeToIntegerList((ArrayNode) jsonNode.get("territorialWaterStatus"));
this.vesselCountry = JsonHelper.arrayNodeToIntegerList((ArrayNode) jsonNode.get("vesselCountry"));
}
public String getBeginDate() {
return beginDate;
}
public void setBeginDate(String beginDate) {
this.beginDate = beginDate;
}
public String getEndDate() { …Run Code Online (Sandbox Code Playgroud) 我有一个由两个子项目(common和common2)组成的Play 2.3.8项目示例:
$ tree -L 2 .
.
??? build.sbt
??? common
? ??? app
? ??? build.sbt
? ??? conf
??? common2
? ??? app
? ??? build.sbt
? ??? conf
??? conf
? (...)
??? build.sbt
Run Code Online (Sandbox Code Playgroud)
主要build.sbt是对这两个子项目的依赖性定义为:
lazy val common = (project in file("common")).enablePlugins(PlayJava)
lazy val common2 = (project in file("common2")).enablePlugins(PlayJava)
lazy val main = (project in file(".")).enablePlugins(PlayJava)
.aggregate(common, common2).dependsOn(common, common2)
Run Code Online (Sandbox Code Playgroud)
这按预期工作.现在我试图使这个项目使用sbt 0.13.7(目前它使用0.13.5),当我启动激活器时,我总是得到这样的错误(Test是我项目的根目录):
[info] Done updating.
java.lang.RuntimeException: No project 'common' in 'file:/home/user/Desktop/Test/'. …Run Code Online (Sandbox Code Playgroud) 我已按照RVM网站上的说明将其安装在我的Ubuntu 12.04 64bit上。现在,当我尝试安装Ruby时,出现构建错误:
$ rvm install ruby-1.9.3
(...)
ruby-1.9.3-p429 - #compiling...........................................
Error running 'make -j 4'
Run Code Online (Sandbox Code Playgroud)
阅读我发现的制作日志:
make: the `-j' option requires a positive integral argument
Run Code Online (Sandbox Code Playgroud)
如果将进程数传递给它,则会得到以下信息:
$ rvm install ruby-1.9.3 -j 2
(...)
Error running 'make -j 4 -j2'
Run Code Online (Sandbox Code Playgroud)
我尝试了其他版本,并得到相同的错误。我怎样才能解决这个问题?
在Tomcat Web服务器中使用JSP时出现以下错误:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 154 in the jsp file: /creaCBdaXLS_passo2.jsp
The method parseRequest(RequestContext) in the type FileUploadBase is not applicable for the arguments (HttpServletRequest)
151:
152: ServletFileUpload upload = new ServletFileUpload(factory);
153:
154: List items = upload.parseRequest(request);
155: Iterator itr = items.iterator();
156:
157: while (itr.hasNext()) {
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:468)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
Run Code Online (Sandbox Code Playgroud)
我该如何解决?
我尝试使用 angular.js 教程应用程序运行 Node,但发现 npm isntall 没有正常运行。
我得到了一个奇怪的旋转小角色,它似乎永远不会停止。
我运行 npm install -verbose 并得到以下调试跟踪:
216 error network tunneling socket could not be established, cause=connect ETIMEDOUT
216 error network This is most likely not a problem with npm itself
216 error network and is related to network connectivity.
216 error network In most cases you are behind a proxy or have bad network settings.
216 error network
216 error network If you are behind a proxy, please make sure that the
216 …Run Code Online (Sandbox Code Playgroud)