有没有人试图在android开发中使用lambdaj库?
当我创建一个简单的小型Java应用程序时,它对我来说很好,但我无法在Android应用程序中使用它.
更新:
我正在添加lambdaj(lambdaj-2.3.2-with-dependencies.jar,从http://code.google.com/p/lambdaj下载),然后在构建我的应用程序时出现以下错误:
Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.hamcrest.generator.qdox.directorywalker.DirectoryScanner$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that …Run Code Online (Sandbox Code Playgroud) 我有一个用C++\CLI编写的程序集,它使用.Net提供的一些枚举.它有这样的属性:
property System::ServiceProcess::ServiceControllerStatus ^ Status
{
ServiceControllerStatus ^ get()
{
return (ServiceControllerStatus)_status->dwCurrentState;
}
}
Run Code Online (Sandbox Code Playgroud)
它工作正常,但当我从我的C#代码使用此程序集时,此属性的类型是
System.Enum
Run Code Online (Sandbox Code Playgroud)
我必须进行类型转换
if ((ServiceControllerStatus)currentService.Status == ServiceControllerStatus.Running)
//do smth
Run Code Online (Sandbox Code Playgroud)
问题很简单:为什么会这样,以及如何解决它?
我正在使用play 2.2.0 Reads来验证我的应用程序中的传入请求.
我正在尝试使用json API实现一个非常简单的事情.我有一个这样的json:
{
"field1": "some value",
"field2": "some another value"
}
Run Code Online (Sandbox Code Playgroud)
我已经Reads检查了其他东西,比如最小长度
case class SomeObject(field1: String, field2: String)
implicit val someObjectReads = (
(__ \ "field1").read(minLength[String](3)) ~
(__ \ "field2").read(minLength[String](3))
)(SomeObject)
Run Code Online (Sandbox Code Playgroud)
我想创建一个解析器组合器,它将匹配两个字段的值,JsSuccess如果值相等则返回,否则JsError将其与现有组合Reads.
我怎样才能做到这一点?
更新:澄清问题并更改代码.
android ×1
c# ×1
c++-cli ×1
dependencies ×1
enumeration ×1
enums ×1
java ×1
json ×1
lambdaj ×1
scala ×1