小编boy*_*eak的帖子

使用 maven-publish 发布库时如何包含子模块依赖项

我有 2 个模块,第一个是module-to-publish,第二个是module-base。现在我想module-to-publish用里面的内容发布到mavenCentral module-base。我应该做什么来包含module-base.

maven-publish

5
推荐指数
0
解决办法
288
查看次数

如何在房间迁移中更改索引?

旧实体如下:

@Entity(tableName = "d_course",
    foreignKeys = @ForeignKey(entity = DUser.class, parentColumns = "id", childColumns = "studio"),
    indices = @Index(value = "studio"))
Run Code Online (Sandbox Code Playgroud)

新的实体如下:

@Entity(tableName = "d_course",
    foreignKeys = @ForeignKey(entity = DUser.class, parentColumns = "id", childColumns = "studio"),
    indices = @Index(value = {"id", "studio"}))
Run Code Online (Sandbox Code Playgroud)

如何迁移此索引更改。

migration android android-room

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

如何在没有R和BuildConfig的情况下发布android库

我制作了一个 android 库,将其发布到 jcenter 的多个版本。但是当我使用它时,我从自己的库中找到了R和BuildConfig参考。如何避免上传R和BuildConfig。这是我的 build.gradle:

version = "2.1.3"
def siteUrl = 'https://github.com/boybeak/DelegateAdapter'
def gitUrl = 'https://github.com/boybeak/DelegateAdapter.git'
group = "com.github.boybeak"
install {
    repositories.mavenInstaller {
        // This generates POM.xml with proper parameters
        pom {
            project {
                packaging 'aar'
                name 'DelegateAdapter'
                url siteUrl
                licenses {
                    license {
                        name 'Apache-2.0'
                        url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                    }
                }
                developers {
                    developer {
                        id 'boybeak'
                        name 'gaoyunfei'
                        email 'boybeak@qq.com'
                    }
                }
                scm {
                    connection gitUrl
                    developerConnection gitUrl
                    url siteUrl
                }
            }
        }
    }
}

task sourcesJar(type: Jar) { …
Run Code Online (Sandbox Code Playgroud)

android gradle jcenter

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

错误:不是常量表达式(Flutter)

body: const Center(
        // Center is a layout widget. It takes a single child and positions it
        // in the middle of the parent.
        child: WebView(
          initialUrl: "https://xxxx",
          navigationDelegate: (navigation) {
            return NavigationDecision.navigate;
          },
        ),
      ),
Run Code Online (Sandbox Code Playgroud)

编译的时候,发生了错误。

lib/main.dart:84:31: Error: Not a constant expression.
          navigationDelegate: (navigation) {
                              ^^^^^^^^^^^^
Run Code Online (Sandbox Code Playgroud)

当我使用flutter-2.2.0and时webview_flutter-2.0.13,上面的代码工作正常。但是当我将 flutter 升级到 2.5.2 并将 webview_flutter 升级到 2.0.13 后,发生了错误。环境(颤振2.5.2):

environment:
  sdk: ">=2.12.0 <3.0.0"
dependencies:
  flutter:
    sdk: flutter
  webview_flutter: 2.1.1
Run Code Online (Sandbox Code Playgroud)

flutter webview-flutter

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