小编Edr*_*ric的帖子

找不到 semver4j-0.16.4-nodeps.jar (com.github.gundy:semver4j:0.16.4)。- Android Studio Java

我遇到了你所说的问题,无法编译。

A problem occurred configuring root project 'PingTv - Copy'.
> Could not resolve all files for configuration ':classpath'.
   > Could not find semver4j-0.16.4-nodeps.jar (com.github.gundy:semver4j:0.16.4).
     Searched in the following locations:
         https://jitpack.io/com/github/gundy/semver4j/0.16.4/semver4j-0.16.4-nodeps.jar

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
Run Code Online (Sandbox Code Playgroud)

作为解决方案,我尝试了这个问题中的解决方案,但它对我不起作用。如果您有帮助,我会很高兴。

我的 Gradle 项目文件如下所示:

// Top-level build file where you can add configuration options common
to all sub-projects/modules.

buildscript {
    ext.kotlin_version = '1.7.10'
    repositories {
        maven {
            url "https://jitpack.io"
        }
        maven {
            url "http://oss.sonatype.org/content/repositories/snapshots" …
Run Code Online (Sandbox Code Playgroud)

java android gradle maven

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

Android Flow/StateFlow 和数据绑定/Room

我正在尝试弄清楚流/状态流和数据绑定。

\n

在我的项目中,我有 Room 中的“打印机”列表,以及 SharedPreferences 中的“默认打印机”的 ID。

\n

这是我的架构:\n在此输入图像描述

\n

1\xc2\xb0/ 问题:我在这个架构中表现良好?

\n

我是否使用了良好的流程并做得很好,还是出了什么问题?

\n

2\xc2\xb0/ 第一个问题:在我的列表中获取我的默认打印机

\n

房间给我一个Flow<List<Printer>>。借助我的适配器,我将其显示在回收器视图中viewModel.allPrinters.collect

\n

但是,当我想从房间绑定资源时,绑定“需要”LiveData 或 StateFlow,这是我的困难,因为 stateIn 需要协程。

\n

我怎样才能从我的默认打印机Flow<List<Printer>>(通过他的属性“id”在列表中找到它)并确保列表/项目是否更新,我的参考也将获得更新?\n如果我更改打印机的名称defaultPrinter并将其更新到 room(感谢我的存储库/room DAO),我希望在我的对象defaultPrinter和列表中更改名称。

\n

您还可以确认我的变量类型defaultPrinter应该是StateFlow<Printer?>

\n

注意:当我更新项目时,printerRoomDAO.update(item:Printer)我必须传递数据对象的副本Printer(新引用),否则我的 UI 将不会更新。

\n

3\xc2\xb0/ 第二个问题:使用状态流看起来很复杂

\n

isPrinterListEmpty这是我的 ViewModel 中的示例

\n
val hasNoPrinter = allPrinters.mapLatest {\n    it.isEmpty()\n}.asLiveData()\n
Run Code Online (Sandbox Code Playgroud)\n

它运行良好,但我不应该使用 StateFlow 吗?怎么做 ?因为stateIn()需要一个协程,而我下面的尝试不起作用。

\n
val hasNoPrinter = …
Run Code Online (Sandbox Code Playgroud)

data-binding kotlin android-livedata kotlin-flow kotlin-stateflow

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

Slick JS 作为滑动选项卡

我发现这个代码片段: https: //codepen.io/hani_ouni/pen/LZxKxG它工作得很好codepen.io ,但是当我下载它并尝试在我的机器上运行它时,它不起作用并打印出以下错误在浏览器的控制台上。

这是代码

html : 
<div class="sub-header ">

 <div class="swipe-tabs">
    <div class="swipe-tab">One</div>
    <div class="swipe-tab">Two</div>
    <div class="swipe-tab">Three</div>
    <div class="swipe-tab">Four</div>
    <div class="swipe-tab">Five</div>
  </div>
</div>
<div class="main-container">
  <div class="swipe-tabs-container ">
    <div class="swipe-tab-content">Tab 1</div>
    <div class="swipe-tab-content">Tab 2</div>
    <div class="swipe-tab-content">Tab 3</div>
    <div class="swipe-tab-content">Tab 4</div>
    <div class="swipe-tab-content">Tab 5</div>
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

CSS:

$swipe-tab-color: #757575;
$swipe-active-tab-color: #000;


.slick-initialized {
  .swipe-tab-content {
    position: relative;
    min-height: 365px;

    @media screen and (min-width: 767px) {
      min-height: 500px;
    }
  }

  .swipe-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    height: …
Run Code Online (Sandbox Code Playgroud)

html javascript jquery

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

材质角度 - 无法正常工作

https://material.angular.io/guide/getting-started

ng new testapp
cd testapp
npm install --save @angular/material @angular/cdk
npm install --save @angular/animations
ng serve
Run Code Online (Sandbox Code Playgroud)

应用程序模块.ts

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MatFormFieldModule, MatInputModule } from '@angular/material';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    MatFormFieldModule,
    MatInputModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
Run Code Online (Sandbox Code Playgroud)

应用程序组件.html

<p>Test Angular Material</p>

<form>
  <mat-form-field class="example-full-width">
    <input matInput …
Run Code Online (Sandbox Code Playgroud)

angular-material angular

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

无法安装 Angular Material

所以我刚刚在 angular CLI 中打开了一个新项目,我想安装 Material :

npm install --save @angular/material @angular/cdk

但它给了我以下错误:

C:\Users\TijlD\Desktop\projects\untitled46>npm install --save @angular/material @angular/cdk 
npm WARN @angular/animations@5.2.8 requires a peer of @angular/core@5.2.8 but none was installed. 
npm WARN @angular/cdk@5.2.4 requires a peer of @angular/core@^5.0.0 but none was installed. 
npm WARN @angular/cdk@5.2.4 requires a peer of @angular/common@^5.0.0 but none was installed. 
npm WARN @angular/material@5.2.4 requires a peer of @angular/core@^5.0.0 but none was installed. 
npm WARN @angular/material@5.2.4 requires a peer of @angular/common@^5.0.0 but none was installed.
Run Code Online (Sandbox Code Playgroud)

有谁知道这意味着什么以及如何摆脱它?

编辑:当我检查 Angular …

angular-material angular

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

支持 angular 5 拖放的材质嵌套树

我正在寻找一个可以构建像https://tina-material-tree.firebaseapp.com/nested-tree这样的嵌套树的库。但是,它无法使用拖放内容构建树。

不确定是否有人知道像这样支持拖放的类似库。

tree angular-material angular

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

如何将mat-form-field和mat-chip-list放在同一行?

我想并排显示一个输入字段和一个芯片项目.但是,芯片将进入下一行.有什么方法可以将它们并排放在同一排吗?

当前位置:

当前位置

预期职位:

预期的位置

angular-material2 angular

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

带图标的材料提示在手机上不起作用

我将 angular 7 与材料一起使用,我想创建一个带有信息图标的输入字段,最终使用 matSuffix 这是一个工具提示。它适用于台式机,但不适用于手机。

我创建了一个堆栈闪电战:https ://angular-ncv2mp.stackblitz.io/ 我也尝试使用按钮,但它也不起作用。

有谁能够帮助我?

tooltip angular-material angular

0
推荐指数
2
解决办法
1885
查看次数

为什么 ThemeProvider(Material UI)在这里对我不起作用?

我已经使用了很多 Material UI,所以这令人困惑。我查看了文档,检查了代码,但看不到问题。我希望嵌套组件中的 H2 标记使用 Arial。但是,它使用 Times 进行渲染。我不知道为什么。

这是我的 index.tsx:

import React from "react";
import ReactDOM from "react-dom";
import App from "./components/App";
import { Provider } from "react-redux";
import configureStore from "./redux/stores/main";
import * as serviceWorker from "./serviceWorker";
import { createMuiTheme } from "@material-ui/core";
import myTheme from "./styling/mainTheme";
import { ThemeProvider } from "@material-ui/styles";

const theme = createMuiTheme({
  typography: {
    fontFamily: ["Arial"].join(",")
  }
});

ReactDOM.render(
  <ThemeProvider theme={theme}>
    <Provider store={configureStore()}>
      <App />
    </Provider>
  </ThemeProvider>,
  document.getElementById("root")
);

serviceWorker.unregister();
Run Code Online (Sandbox Code Playgroud)

我的应用程序组件:

import React from …
Run Code Online (Sandbox Code Playgroud)

css reactjs material-ui

0
推荐指数
2
解决办法
7210
查看次数

如何在不覆盖自动文本颜色的情况下使用 Flutter AppTheme TextTheme

当我使用我的应用程序中的文本主题时,Theme.of(context).textTheme.subhead 文本会更新为适当的大小和重量,但颜色也始终为黑色。如何使用定义的文本主题,同时仍然允许颜色自动更改(例如:当放置在深色按钮上时,从黑色变为白色?

我的应用主题使用默认文本主题,(减去几个重量变化)

我环顾四周,我认为我正在正确使用它,但我不确定。


TextTheme _customizeTextTheme(TextTheme base) {
  return base.copyWith(
    title: base.title.copyWith(
      fontWeight: FontWeight.bold,
    ),
    body2: base.body2.copyWith(
      fontWeight: FontWeight.bold,
    ),
  );
}

ThemeData _buildLightTheme() {
  const Color primaryColor = Colors.white;
  const Color secondaryColor = Colors.red;
  final ColorScheme colorScheme = const ColorScheme.light().copyWith(
    primary: primaryColor,
    secondary: secondaryColor,
  );
  final ColorScheme buttonColorScheme = const ColorScheme.light().copyWith(
    primary: secondaryColor,
    secondary: primaryColor,
  );
  final ThemeData base = ThemeData(
//    typography: Typography(
//      englishLike: Typography.englishLike2018,
//      dense: Typography.dense2018,
//      tall: Typography.tall2018,
//    ), //This is for …
Run Code Online (Sandbox Code Playgroud)

themes flutter

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