flutter

Android tools:replace用法

使用场景,为什么需要Android tools:replace 假设我们使用了第三方android module,这个module处于某种原因在开发的时候使用了app_name。比如下面这样 <application android:icon="@mipmap/ic_launcher" android:allowBackup="true" android:backupAgent="com.github.shadowsocks.ConfigBackupHelper" android:extractNativeLibs="true" android:label="@string/app_name" android:supportsRtl="true" android:networkSecurityConfig="@xml/network_security_config" android:banner="@mipmap/banner"> ........ </application> 我们自己app也有指定android:label,那么就会产生冲突报错大致如下 Manifest merger failed : Attribut...

flutter插件引用aar导致Duplicate class android.support.v4.app.INotificationSideChannel

错误信息 Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:28.0.0) Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:28.0.0) Duplicate class android.support.v4.graphics.drawable.IconCompatParcelizer found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:28.0.0) Duplicate class android.su...

kotlin中when的用法

when是什么 when用于在kotlin中实现类c语言中的switch关键字 when怎么用 when (x) { 1 -> print("x == 1") 2 -> print("x == 2") else -> { // Note the block print("x is neither 1 nor 2") } } 差不多是类C语言中这么个意思 swicth(x){ case 1: ....... break; case 2: ....... break; default: // kotlin else ....... break; } 帮助 https://kotlinlang.org/docs/reference/control-flow.html

gradle编译太慢的解决办法

gradle编译速度实在太慢,一个hello world竟然要15s。改用本文配置之后只要2.15s 解决方法 gradle.property文件 org.gradle.jvmargs=-Xmx1536m 改为 org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 org.gradle.daemon=true org.gradle.parallel=true org.gradle.configureondemand=true

flutter gesture空白区域不响应ontap解决方法

问题描述 Widget buildServerItem(BuildContext context, Server server){ return Column( children: <Widget>[ seperateLine, Container( padding: const EdgeInsets.only(top:15.0, left:20.0, right:20.0, bottom: 15.0), child: GestureDetector(![QQ截图20191030163401.png][1] onTap:() => print("say hello"), child: Row( children: <Widget>[ Expanded( child: Row( children: <Widget>[ Image.asset("assets/images/server.png"),//Icon(Icons.storage, color:Color(0xFF0...
执行时间: 32.07802772522 毫秒