小编Jun*_*lid的帖子

Gradle:“无法缓存配置缓存状态”

Configuration cache state could not be cached: field 'actions' from type 'org.gradle.api.DefaultTask': error writing value of type 'java.util.ArrayList'
> Configuration cache state could not be cached: field 'closure' from type 'org.gradle.api.internal.AbstractTask$ClosureTaskAction': error writing value of type 'com.chaquo.python.PythonPlugin$_createAssetsTasks_closure21$_closure46'
   > Configuration cache state could not be cached: field 'variant' from type 'com.chaquo.python.PythonPlugin$_createAssetsTasks_closure21$_closure46': error writing value of type 'groovy.lang.Reference'
      > Configuration cache state could not be cached: field 'value' from type 'groovy.lang.Reference': error writing value of type 'com.android.build.gradle.internal.api.ApplicationVariantImpl'
         > Configuration cache state could …
Run Code Online (Sandbox Code Playgroud)

android android-studio

18
推荐指数
2
解决办法
9559
查看次数

将尾随小部件推到 Flutter Navigation Rail 的底部

如何将 Flutter Navigation Rail 中的尾随 widget 推到导轨底部?我认为这就像用扩展小部件包装尾随小部件一样简单,但我收到了通常的颤动需要绘制错误消息。

如果我添加一个具有固定高度Column的第一个子元素SizedBox,然后添加我想要显示的小部件,我可以让它工作,但我需要间隔来填充可用空间,而不是固定高度。下面的SizedBox示例确实填充了 200px 的空间,但是如何让它填充可用空间呢?

// other navrail properties....

     trailing: Column(
        children: [
          SizedBox(
            height: 200,
          ),
          IconButton(icon: Icon(Icons.settings), onPressed: () {})
        ],
      ),
Run Code Online (Sandbox Code Playgroud)

flutter flutter-layout

8
推荐指数
1
解决办法
3644
查看次数

为什么 PrimaryVariant 属性已被弃用?

我正在开发一个 flutter 项目并MaterialApp在提供ColorScheme我使用的primaryVariant属性时使用,但现在官方文档说它已被弃用并要求使用primaryContainer. 但我找不到任何原因,到底哪里出了问题primaryVariant?为什么它被弃用了?

themes material-design flutter flutter-layout

8
推荐指数
1
解决办法
2209
查看次数

将 Xamarin 项目转换为 .net MAUI 时出现“错误 CS0579:重复‘global::Android.Runtime.Resource DesignerAttribute’属性”

我创建了一个示例 Xamarin 项目,并尝试使用以下步骤将其转换为 Maui 项目(https://github.com/dotnet/maui/wiki/Migration-from-Xamarin.Forms-(Preview)),但它显示错误:-

error CS0579: Duplicate 'global::Android.Runtime.Resource DesignerAttribute' attribute 
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

android xamarin.android xamarin

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

Gradle 未在 Android Studio 中同步

我是 Android studio 的新手,我正在尝试建立一个新项目,但遇到以下错误消息:

Could not find com.android.tools.build:gradle:7.0.4.
Searched in the following locations:
  - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.0.4/gradle-7.0.4.pom
  - https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.0.4/gradle-7.0.4.pom
Required by:
    project :
Add google Maven repository and sync project
Open File
Run Code Online (Sandbox Code Playgroud)

我搜索了 Gradle 网站,发现我的 Android studio 默认设置的 7.0.4 在官方存储库中不存在。所以我下载了另一个版本(7.4.1)并更改了文件中的版本build.gradle,但没有解决问题。我使用该gradle-wrapper.properties文件下载了Gradle,但仍然无法运行。然后我尝试通过打开离线模式并更改位置来离线使用 gradle 插件file > settings > Build, Execution, Deployment > Build tools > Gradle,它向我显示了以下错误消息:

A problem occurred configuring root project 'My Application'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:7.4.1.
     Required …
Run Code Online (Sandbox Code Playgroud)

java android gradle maven android-studio

5
推荐指数
2
解决办法
2万
查看次数

[Android Studio]:非法处理指令目标(“xml”);xml(不区分大小写)由规范保留

:app:mergeDebugResources 1error

Illegal processing instruction target ("xml"); xml (case insensitive) is reserved by the specs.
 at [row,col {unknown-source}]: [5,9]
Run Code Online (Sandbox Code Playgroud)

它说了什么?

请帮忙!!提前致谢。

android xml-parsing

5
推荐指数
2
解决办法
4958
查看次数

选项卡中的大文本未完全显示 Flutter

我正在开发一个需要选项卡的 Flutter 项目,但其中一个选项卡名称很大,名称显示不完整,如图所示,我该如何解决这个问题,我想要文本TabBarmultiline我是新手颤振,因此任何帮助将不胜感激。

当前选项卡情况

这是代码

TabBar(
  tabs: [
    Tab(
      text: "Clock",
      icon: Icon(Icons.access_time),
    ),
    Tab(
      text: "Alarm",
      icon: Icon(Icons.access_alarm),
    ),
    Tab(
      text: "Stopwatch",
      icon: Icon(Icons.av_timer),
    ),
    Tab(
      text: "Countdown Timer",
      icon: Icon(Icons.timer_rounded),
    )
  ],
),
Run Code Online (Sandbox Code Playgroud)

tabs tabbar flutter flutter-layout

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