小编Rav*_*ran的帖子

Gradle 错误:“未找到 id 为 'dev.flutter.flutter-gradle-plugin' 的插件” - Flutter

我在 Flutter 项目中遇到 Gradle 错误,但似乎无法解决。当我尝试构建并运行 Flutter 应用程序时,出现以下错误:

Could not apply requested plugin [id: 'dev.flutter.flutter-gradle-plugin', version: '1.0.0'] as 
it does not provide a plugin with id 'dev.flutter.flutter-gradle-plugin'. This is caused by an 
incorrect plugin implementation. Please contact the plugin author(s).
> Plugin with id 'dev.flutter.flutter-gradle-plugin' not found.
Run Code Online (Sandbox Code Playgroud)

此错误是在我的应用程序模块的 build.gradle 文件中的这一行触发的:

apply plugin: 'dev.flutter.flutter-gradle-plugin'
Run Code Online (Sandbox Code Playgroud)

如果您需要任何进一步的信息来帮助我解决此问题,请告诉我。谢谢你!

android gradle build.gradle flutter flutter-dependencies

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

为什么要使用malloc()?为什么变量的大小没有增加?

根据我的老师的答案,malloc动态分配内存,然后为什么输出显示为正常变量和分配相同的大小malloc();。我是编程的新手,所以我想您会以新手可以理解的方式回答我的问题。

#include<stdio.h>

int main()
{
    int a,b;
    a = (int *) malloc(sizeof(int)*2);
    printf("The size of a is:%d \n",sizeof(a));
    printf("The size of b is:%d \n",sizeof(b));
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

输出:

The size of a is:4
The size of b is:4
Run Code Online (Sandbox Code Playgroud)

c

-4
推荐指数
1
解决办法
119
查看次数