小编hel*_*am1的帖子

Android Studio Gradle Build失败 - 要求提供不存在的sdk版本

24小时前我的项目完美构建,没有错误.在不更改单个代码的情况下,当我恢复工作时,它将不再构建.签出旧的工作提交现在会产生相同的错误.

这些是我得到的错误代码:

Information:Gradle tasks [assemble]
Error:(9, 5) error: resource android:attr/dialogCornerRadius not found.
/home/liam/.gradle/caches/transforms-1/files-1.1/appcompat-v7-28.0.0-alpha1.aar/536e4dd78846259cf8bef0fd6a3ea0e6/res/values/values.xml
Run Code Online (Sandbox Code Playgroud)

我认为这是由Android P发布和我的Android Studio自动升级或类似的东西引起的.这可以解释为什么有效的旧提交会得到同样的错误.这将是一个非常新的问题,这可以解释为什么我还没有找到解决方案.

搜索这些错误代码会导致类似的问题,可以通过更改gradle构建文件中的SDK版本来解决.我的问题与此不同,因为更改为SDK 28(我很确定28甚至不存在)导致android工作室说这个包不可用/不存在下载.

如何找到问题Android SDK 3.0错误:(9,5)错误:资源android:attr/colorError未找到

单击前面提到的错误代码会打开一个名为v28/values-v28.xml的文件.

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="Base.Theme.AppCompat" parent="Base.V28.Theme.AppCompat"/>
    <style name="Base.Theme.AppCompat.Light" parent="Base.V28.Theme.AppCompat.Light"/>
    <style name="Base.V28.Theme.AppCompat" parent="Base.V26.Theme.AppCompat">
        <!-- We can use the platform styles on API 28+ -->
        <item name="dialogCornerRadius">?android:attr/dialogCornerRadius</item>
    </style>
    <style name="Base.V28.Theme.AppCompat.Light" parent="Base.V26.Theme.AppCompat.Light">
        <!-- We can use the platform styles on API 28+ -->
        <item name="dialogCornerRadius">?android:attr/dialogCornerRadius</item>
    </style>
</resources>
Run Code Online (Sandbox Code Playgroud)

这是我的gradle文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.timelord.timelord.timelord"
        minSdkVersion …
Run Code Online (Sandbox Code Playgroud)

android android-studio android-gradle-plugin

7
推荐指数
1
解决办法
3869
查看次数

iOS/Apple AppIntent Is it possible to dynamically chain different AppIntents with OpensIntent?

With iOS/Apple AppIntents, your iOS app can declare AppIntents, which users can use from the Shortcuts App to use as steps in their own manually/Siri/etc triggered Shortcuts, but also from their own Automations (when a certain event occurs, run a series of AppIntents or a specific Shortcut etc), to run code you've defined.

If you want to dynamically trigger follow up AppIntents, your User has to use the if logic to wrap the AppIntent as they use it to make …

ios swift sirishortcuts appintents

7
推荐指数
0
解决办法
390
查看次数