小编Ber*_*ris的帖子

Flutter报错无法启动守护进程

我的 flutter 项目在我的旧笔记本电脑上运行顺利。但是当我使用我的新笔记本电脑时,我的 flutter 项目无法在调试模式下运行。

这个错误

FAILURE: Build failed with an exception.


* What went wrong:

Unable to start the daemon process.

This problem might be caused by incorrect configuration of the daemon.

For example, an unrecognized jvm option is used.

Please refer to the User Manual chapter on the daemon at https://docs.gradle.org/5.6.2/userguide/gradle_daemon.html

Process command line: C:\Program Files (x86)\Java\jre1.8.0_221\bin\java.exe -Xmx1536M -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant -cp C:\Users\ajoris\.gradle\wrapper\dists\gradle-5.6.2-all\9st6wgf78h16so49nn74lgtbb\gradle-5.6.2\lib\gradle-launcher-5.6.2.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 5.6.2

Please read the following process output to find out more:

-----------------------

Error …
Run Code Online (Sandbox Code Playgroud)

gradle build.gradle flutter

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

Flutter - 如何限制文本长度

我是颤振的新手。使用TextSpan小部件时如何限制文本?

我的代码

Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.symmetric(vertical: 8.0),
      child: Row(
        children: <Widget>[
          Expanded(
            flex: 2,
            child: Row(
              children: <Widget>[
                Stack(
                  children: <Widget>[
                    ClipRRect(
                      borderRadius: BorderRadius.all(Radius.circular(8)),
                      child: Image.asset(
                        lastPlayedGame.imagePath,
                        height: 60,
                        width: 45,
                        fit: BoxFit.cover,
                      ),
                    ),
                    Positioned(
                      left: 8,
                      right: 8,
                      top: 0,
                      bottom: 0,
                      child: Container(
                        decoration: BoxDecoration(
                          shape: BoxShape.circle,
                          color: Colors.white,
                        ),
                        child: Icon(
                          Icons.play_arrow,
                          color: Colors.red,
                        ),
                      ),
                    ),
                  ],
                ),
                Padding(
                  padding: const EdgeInsets.symmetric(horizontal: 12),
                  child: RichText(
                    text: TextSpan(children: [ …
Run Code Online (Sandbox Code Playgroud)

dart flutter

11
推荐指数
4
解决办法
3万
查看次数

jQuery Mobile关闭页面对话框

如何在jQuery Mobile中关闭对话框页面?

在我的特殊情况下,我调用另一个页面作为页面加载,然后在完成该过程之后我想将ajax页面加载关闭并再次出现一个包含所有数据的对话框页面回调ajax.

我的代码:

$("#login").click(function(e){
LoadingPanel();
e.preventDefault();
     $.ajax({
        url:'http://www.myurl.com/soap/login.php',
        dataType:'jsonp',
        timeout: 15000,
        cache: false,
        data: dataString,
        success:function(response){

            //Dialog page closed here

            for(var i=0; i<response.length; i++){
                    var str,str2,str3,str4,str5,str6,str7 = "";
                    str     = response[i].NE;
                    str2    = response[i].EMAIL;
                    str3    = response[i].TIPE;
                    str4    = response[i].NAMA;
                    str5    = response[i].TELP;
                    str6    = response[i].DN;
                    str7    = response[i].DESC_LOGIN;


                if(str=='-'){
                    alert('Data does not match')
                }else{
                var AllData = ""
                    AllData = 'Data1 : '+str+'\nData2 : '+str2+'\nData3 : '+str3+'\nData4 : '+str4+'\nData5 : '+str5
                    alert(AllData);
                    //How do I display this data …
Run Code Online (Sandbox Code Playgroud)

html jquery jquery-mobile

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

修改Yii CRUD生成(Gii)表单模板

我想改变Gii模板,按照我自己的模板,我找到了要更改的代码

<div class="errorMessage">....</div> 成为我自己的模板风格?

我已经更改了大部分gii模板样式,但我还没有找到更改"div"错误消息的行: framework\gii\generators\crud\templates\default

php yii

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

如何在vue组件中包含外部js

我想slide image使用从互联网获得的jQuery Slide Image在我的应用程序中创建一个。此源必须包括外部JSCSS

我只想将此外部库仅用于某些组件,所以只想将其导入一个特定的组件(Home Component)。

我的应用程序webpack用作模块捆绑器。如何导入外部js文件?我已经尝试<script>在Vue组件中像

var slide = require('assets/template/js/jssor.slider-26.1.5.min.js');
Run Code Online (Sandbox Code Playgroud)

但是我得到了错误:

Error: Cannot find module "assets/template/js/jssor.slider-26.1.5.min.js"
Run Code Online (Sandbox Code Playgroud)

我的应用程序结构 在此处输入图片说明

如果我导入的方法js files错误的,那么仅在home组件上使用此js的正确方法是什么,如果我在index.html中注册,而不会击中所有组件,该怎么办?

javascript vue-component vuejs2

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

我应该使用View Holder图案作为我的适配器吗?

当我创建一个类时extends BaseAdapter,我收到一条警告消息

Unconditional layout inflation from view adapter: Should use View Holder pattern (use recycled view passed into this method as the second parameter) for smoother scrolling

我是否需要像这个建议一样更改我的代码?我的所有代码都运行顺畅,只是necessary更改代码以使用最新样式执行updata代码?或者只是需要添加@SuppressLint({ "ViewHolder", "InflateParams" })

我的适配器

public View getView(int position, View convertView, ViewGroup parent) {
    View v = inflater.inflate(R.layout.list_item, null);

    TextView merchant_type = (TextView) v.findViewById(R.id.merchant_type);
    TextView merchant_name = (TextView) v.findViewById(R.id.merchant_name);
    TextView merchant_location = (TextView) v.findViewById(R.id.merchant_location);

    VoucherBean obj = (VoucherBean) getItem(position);

    merchant_type.setText(obj.getMerchantType());
    merchant_name.setText(obj.getMerchantName());
    merchant_location.setText(obj.getMerchantLocation());

    return v;
}
Run Code Online (Sandbox Code Playgroud)

如果你想按照上面推荐的警告更改我的代码,就像我的代码稍后一样?对不起,如果我的问题对初学者来说太基础了

java android

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

错误未处理的异常:当切换另一个 BottomNavigationBar 时,在 dispose() 之后调用 setState()

我有 5 个菜单BottomNavigationBar。当我从一个切换到另一个时,有时会收到一条错误消息,例如

E/flutter (13314): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: setState() called after dispose(): _PromoProductState#a00c8(lifecycle state: defunct, not mounted)
E/flutter (13314): This error happens if you call setState() on a State object for a widget that no longer appears in the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error can occur when code calls setState() from a timer or an animation callback.
E/flutter (13314): The preferred solution is to cancel the timer …
Run Code Online (Sandbox Code Playgroud)

dart flutter

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