Android sdk-manager与php冲突?

时间:2018-04-05 19:48:18

标签: java php android pear godot

我需要在Godot Game引擎中导出到android,所以我安装了android sdk(仅限命令行工具)并运行此命令:

sdkmanager "platform-tools" "platforms;android-26"

这就是发生的事情:

D:\android-sdk\bin>sdkmanager "platform-tools" "platforms;android-26"
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\web\asgard\vendor\mockery\mockery\package.xml
Warning: Invalid package.xml found at D:\storage\dev\web\asgard\vendor\mockery\mockery\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\web\coaster\vendor\mockery\mockery\package.xml
Warning: Invalid package.xml found at D:\storage\dev\web\coaster\vendor\mockery\mockery\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\123friluft_old\vendor\phpunit\php-text-template\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\123friluft_old\vendor\phpunit\php-text-template\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\123friluft_old\vendor\phpunit\php-timer\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\123friluft_old\vendor\phpunit\php-timer\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\123friluft_old\vendor\sebastian\version\build\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\123friluft_old\vendor\sebastian\version\build\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\arakash\plugins\rainlab\googleanalytics\vendor\firebase\php-jwt\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\arakash\plugins\rainlab\googleanalytics\vendor\firebase\php-jwt\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\bitshape\vendor\phpunit\php-file-iterator\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\bitshape\vendor\phpunit\php-file-iterator\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\bitshape\vendor\phpunit\php-text-template\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\bitshape\vendor\phpunit\php-text-template\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\bitshape\vendor\phpunit\php-timer\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\bitshape\vendor\phpunit\php-timer\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\bitshape\vendor\sebastian\version\build\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\bitshape\vendor\sebastian\version\build\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\fluid\vendor\phpunit\php-text-template\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\fluid\vendor\phpunit\php-text-template\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\fluid\vendor\phpunit\php-timer\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\fluid\vendor\phpunit\php-timer\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\fluid\vendor\sebastian\version\build\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\fluid\vendor\sebastian\version\build\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\gaus\vendor\mockery\mockery\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\gaus\vendor\mockery\mockery\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\gentlefox.old\vendor\phpunit\php-file-iterator\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\gentlefox.old\vendor\phpunit\php-file-iterator\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\gentlefox.old\vendor\phpunit\php-text-template\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\gentlefox.old\vendor\phpunit\php-text-template\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\gentlefox.old\vendor\phpunit\php-timer\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\gentlefox.old\vendor\phpunit\php-timer\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\gentlefox.old\vendor\sebastian\version\build\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\gentlefox.old\vendor\sebastian\version\build\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\gentlefox\vendor\mockery\mockery\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\gentlefox\vendor\mockery\mockery\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\gentler\vendor\phpunit\php-text-template\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\gentler\vendor\phpunit\php-text-template\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\gentler\vendor\phpunit\php-timer\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\gentler\vendor\phpunit\php-timer\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\gentler\vendor\sebastian\version\build\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\gentler\vendor\sebastian\version\build\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\highpulse\vendor\phpunit\php-file-iterator\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\highpulse\vendor\phpunit\php-file-iterator\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\highpulse\vendor\phpunit\php-text-template\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\highpulse\vendor\phpunit\php-text-template\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\highpulse\vendor\phpunit\php-timer\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\highpulse\vendor\phpunit\php-timer\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\highpulse\vendor\sebastian\version\build\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\highpulse\vendor\sebastian\version\build\package.xml and failed to parse using fallback.
Warning: cvc-elt.1: Cannot find the declaration of element 'package'.
Warning: unexpected element (uri:"http://pear.php.net/dtd/package-2.0", local:"package"). Expected elements are <{http://schemas.android.com/repository/android/common/01}repository>,<{http://schemas.android.com/repository/android/generic/01}repository>,<{http://schemas.android.com/sdk/android/repo/addon2/01}sdk-addon>,<{http://schemas.android.com/sdk/android/repo/repository2/01}sdk-repository>,<{http://schemas.android.com/sdk/android/repo/sys-img2/01}sdk-sys-img>
Warning: Found corrupted package.xml at D:\storage\dev\www\smakenavdamp\vendor\mockery\mockery\package.xml
Warning: Invalid package.xml found at D:\storage\dev\www\smakenavdamp\vendor\mockery\mockery\package.xml and failed to parse using fallback.

世界上发生了什么? :S

2 个答案:

答案 0 :(得分:2)

首先,请务必按照以下文章中的答案清除任何凌乱/错误的配置:

How to completely uninstall Android Studio from windows(v10)?

还要记住,sdk应该存在于自己的“android”目录中。换句话说,在诸如D:\android-sdk之类的路径中使用sdk是有问题的,因为它需要上面的目录。因此,请将sdk放在D:\android\sdk之类的目录中。

答案 1 :(得分:0)

在我的Linux中,我发现了相同的内容并进行了以下修复(对与 tools 相同的 path 下的文件获得相同的错误):

  • 创建目录 $ HOME / Android / Sdk
  • $ HOME / Android / Sdk 下解压缩sdkmanager cli( $ HOME / Android / Sdk / tools
  • 将以下内容添加到〜/ .profile
export ANDROID_SDK_ROOT=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:$ANDROID_SDK_ROOT/tools/bin

重新加载〜/ .profile,

source ~/.profile

完成