将项目从计算机移动到另一台计算机时出错

时间:2016-03-24 08:51:00

标签: android android-studio

我从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-A复制到Pc-B,但它会导致同样的错误。

更新 现在重置到android studio后(删除用户文件夹中存在的.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;
    }

1 个答案:

答案 0 :(得分:0)

问题解决了。输入:C:\Users\yourusername,然后将文件夹.AndroidStudio1.5移动到任何其他路径(可能是桌面),然后打开Android Studio。 现在,Android工作室将首次启动,就像它是第一次在这台计算机上启动一样。然后尝试使用错误打开项目,如果发生相同的错误,请将.AndroidStudio1.5恢复为C:\Users\yourusername。 et Voila!

相关问题