gpt4 book ai didi

androidtv-Leanback-master 构建错误

转载 作者:太空宇宙 更新时间:2023-11-03 12:51:52 25 4
gpt4 key购买 nike

[环境]
Android Studio 1.1.0
buildToolsVersion "21.1.2"

当我构建“androidtv-Leanback-master”时遇到了这个错误:

Executing tasks: [clean, :app:compileDebugSources]

Configuration on demand is an incubating feature.
:app:clean
:app:preBuild
:app:preDebugBuild
:app:checkDebugManifest
:app:preReleaseBuild
:app:prepareComAndroidSupportAppcompatV72200Library
:app:prepareComAndroidSupportLeanbackV172200Library
:app:prepareComAndroidSupportRecyclerviewV72200Library
:app:prepareComAndroidSupportSupportV42200Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources
:app:mergeDebugResources
D:\andorid_code\androidtv-Leanback-master\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\22.0.0\res\drawable-hdpi-v4\abc_spinner_mtrl_am_alpha.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited

:app:processDebugManifest
:app:processDebugResources
D:\andorid_code\androidtv-Leanback-master\app\build\intermediates\res\debug\transition-v22\lb_browse_entrance_transition.xml:23: error: Error: String types not allowed (at 'slideEdge' with value 'end').

D:\andorid_code\androidtv-Leanback-master\app\build\intermediates\res\debug\transition-v22\lb_browse_return_transition.xml:18: error: Error: String types not allowed (at 'slideEdge' with value 'start').

D:\andorid_code\androidtv-Leanback-master\app\build\intermediates\res\debug\transition-v22\lb_browse_return_transition.xml:27: error: Error: String types not allowed (at 'slideEdge' with value 'end').


FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
D:\AndroidSDK\build-tools\21.1.2\aapt.exe package -f --no-crunch -I D:\AndroidSDK\platforms\android-21\android.jar -M D:\andorid_code\androidtv-Leanback-master\app\build\intermediates\manifests\full\debug\AndroidManifest.xml -S D:\andorid_code\androidtv-Leanback-master\app\build\intermediates\res\debug -A D:\andorid_code\androidtv-Leanback-master\app\build\intermediates\assets\debug -m -J D:\andorid_code\androidtv-Leanback-master\app\build\generated\source\r\debug -F D:\andorid_code\androidtv-Leanback-master\app\build\intermediates\res\resources-debug.ap_ --debug-mode --custom-package com.example.android.tvleanback -0 apk --output-text-symbols D:\andorid_code\androidtv-Leanback-master\app\build\intermediates\symbols\debug
Error Code:
1
Output:
D:\andorid_code\androidtv-Leanback-master\app\build\intermediates\res\debug\transition-v22\lb_browse_entrance_transition.xml:23: error: Error: String types not allowed (at 'slideEdge' with value 'end').

D:\andorid_code\androidtv-Leanback-master\app\build\intermediates\res\debug\transition-v22\lb_browse_return_transition.xml:18: error: Error: String types not allowed (at 'slideEdge' with value 'start').

D:\andorid_code\androidtv-Leanback-master\app\build\intermediates\res\debug\transition-v22\lb_browse_return_transition.xml:27: error: Error: String types not allowed (at 'slideEdge' with value 'end').



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

BUILD FAILED

Total time: 48.334 secs

最佳答案

我通过将我的项目升级为使用 API-22 解决了这个问题。即,我更改了以下内容:

android {
compileSdkVersion 22
buildToolsVersion '21.1.2'

defaultConfig {
minSdkVersion 11
targetSdkVersion 22
...
}

...

dependencies {
...
androidTVCompile 'com.android.support:recyclerview-v7:22.0.0'
androidTVCompile 'com.android.support:leanback-v17:22.0.0'
androidTVCompile 'com.android.support:appcompat-v7:22.0.0'
}
}

这还需要更改某些 fragment 中 HeaderItem 标签的使用。您也可以只使用以前版本的库并继续使用 API-21

关于androidtv-Leanback-master 构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29149362/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com