我从sourceforge下载了AJMRTD项目,并在一台计算机(PC-A)上试用,结果进展顺利。但是,从同一来源下载到另一台计算机(PC-B)的相同项目失败了,一些错误如下:
Error:(98, 19) error: type PassportService does not take parameters
Error:(98, 70) error: type PassportService does not take parameters
Error:(105, 25) error: BACKeySpec is abstract; cannot be instantiated
Error:(183, 32) error: cannot find symbol method getBiometricTemplates()
Error:(198, 36) error: cannot find symbol method getBiometricTemplates()我试着将项目从Pc复制到Pc,但这会导致同样的错误。
更新:重启到.AndroidStudio后的(删除用户文件夹中存在的.AndroidStudio)。在从PC-A获取SDK文件夹并将其复制到C:\Users\Username\AppData\Local\Android之后,出现了新的错误:错误:(290,34)错误:不兼容类型:对象不能转换为C,其中C是类型变量:
C extends Object declared in class APDUFingerprint
Note: C:\Users\Username\Desktop\New folder\ajmrtd\ajmrtd\ajmrtd\scuba_smartcards_j2se\src\main\java\net\sourceforge\scuba\smartcards\APDUFingerprint.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Error:Execution failed for task ':scuba_smartcards_j2se:compileJava'.
> Compilation failed; see the compiler error output for details. 更新2:
private boolean isAllowedBy(APDUFingerprint<C,R> thisPrint, APDUFingerprint otherPrint) {
for (C c: thisPrint.commandResponsePairs.keySet()) {
C otherC = getSimilarCommandAPDU(c, otherPrint); // **the error imply to getSimilar**
if (otherC == null) { continue; }
if (!isAllowedBy(c, otherC)) { return false; }
int response = thisPrint.getResponse(c);
int otherResponse = otherPrint.getResponse(otherC);
if (response == -1 || otherResponse == -1) { continue; }
if (response != otherResponse) { return false; }
}
System.out.println("DEBUG: isAllowedBy(" + thisPrint + ", " + otherPrint + ")");
return true;
}发布于 2016-03-30 06:09:33
问题解决了。输入:C:\Users\yourusername,然后将文件夹.AndroidStudio1.5移动到任何其他路径(可能是桌面),然后打开Android。现在,Android工作室将启动,就好像这是第一次在这台计算机上启动。然后尝试使用错误打开项目,如果发生同样的错误,请将.AndroidStudio1.5还原为C:\Users\yourusername。艾特·沃拉!
https://stackoverflow.com/questions/36196224
复制相似问题