J'ai importé le référentiel Telegram. et essayé d'exécuter le projet, mais a obtenu l'erreur ci-dessus dans le fichier Passcodeview.java
. Il montre l'erreur dans cet extraitErreur types incomparables: Objet et int dans Télégramme
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
View rootView = getRootView();
int usableViewHeight = rootView.getHeight() - AndroidUtilities.statusBarHeight - AndroidUtilities.getViewInset(rootView);
getWindowVisibleDisplayFrame(rect);
keyboardHeight = usableViewHeight - (rect.bottom - rect.top);
if (UserConfig.passcodeType == 1 && (AndroidUtilities.isTablet() || getContext().getResources().getConfiguration().orientation != Configuration.ORIENTATION_LANDSCAPE)) {
int t = 0;
if (passwordFrameLayout.getTag() != 0) {
t = (Integer) passwordFrameLayout.getTag();
}
LayoutParams layoutParams = (LayoutParams) passwordFrameLayout.getLayoutParams();
layoutParams.topMargin = t + layoutParams.height - keyboardHeight/2 - (Build.VERSION.SDK_INT >= 21 ? AndroidUtilities.statusBarHeight : 0);
passwordFrameLayout.setLayoutParams(layoutParams);
}
super.onLayout(changed, left, top, right, bottom);
}
Alors que le même projet mené une fois dans ma autre machine correctement, je ne change rien.