Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

打release包报错,帮忙看看,谢谢 #5

Open
gdongy opened this issue Mar 2, 2018 · 2 comments
Open

打release包报错,帮忙看看,谢谢 #5

gdongy opened this issue Mar 2, 2018 · 2 comments

Comments

@gdongy
Copy link

gdongy commented Mar 2, 2018

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Error: cmd: Command failed with exit code 1 Error output:
F:\workappusekey\ggbapp\platforms\android\src\com\zhijianhuo\cordova\plugin\BaichuanPlugin.java:131: ����: -source 1.6 �в�֧�� switch �д����ַ���
switch (action) {
^
(��ʹ�� -source 7 �����߰汾������ switch �д����ַ���)
ע: ijЩ�����ļ�ʹ�û򸲸����ѹ�ʱ�� API��
ע: �й���ϸ��Ϣ, ��ʹ�� -Xlint:deprecation ���±��롣
1 ������

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':compileReleaseJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
@gdongy
Copy link
Author

gdongy commented Mar 5, 2018

求大佬说说啊,找到报错的地方看了看报错是switch()方法错误,但检查看了看没发现问题啊,谢谢

@gdongy
Copy link
Author

gdongy commented Mar 5, 2018

private boolean auth(String action, final CallbackContext callbackContext) throws JSONException {
final AlibcLogin alibcLogin = AlibcLogin.getInstance();
switch (action) {
case "login":
alibcLogin.showLogin(new AlibcLoginCallback() {
@OverRide
public void onSuccess(int i) {
returnSession(callbackContext);
}
@OverRide
public void onFailure(int i, String s) {
callbackContext.error(s);
}
});
break;
case "getSession":
returnSession(callbackContext);
break;
case "logout":
alibcLogin.logout(new AlibcLoginCallback() {
@OverRide
public void onSuccess(int i) {
callbackContext.success();
}

                @Override
                public void onFailure(int i, String s) {
                    callbackContext.error(s);
                }
            });
            break;
        default:
            callbackContext.error("Invalid Action");
            return false;
    }
    return true;
}

这就是报错的代码,报的就是这个switch错误,谢谢了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant