标签: build-tools

Android Api 24找不到来源

我有这个成绩档案:

//ext.support_library_version = '24.0.0'

    android {
        compileSdkVersion 24
        buildToolsVersion '24.0.0'

        defaultConfig {
            applicationId "---"
            minSdkVersion 21
            targetSdkVersion 24
            versionCode 1
            versionName "1.0"
        }
    ...
    }
Run Code Online (Sandbox Code Playgroud)

但是当我尝试打开任何与Android相关的类时,它说我没有api24的来源,即使buildToolsVersion '24.0.0'安装了它.知道为什么吗?

sdk android build-tools android-7.0-nougat

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

如何使用Webpack 4 SplitChunksPlugin和HtmlWebpackPlugin进行多页面应用?

我正在尝试利用SplitChunksPlugin为MPA中的每个页面/模板生成单独的包.当我使用HtmlWebpackPlugin时,我会为每个页面获取一个html文件,其中脚本标记指向正确的包.那样太好了!但是,我遇到的问题是我的供应商文件.我希望单独的html文件只指向他们需要的供应商包.当SplitChunksPlugin创建多个供应商捆绑包时,我无法将每个单独的html文件指向正确的供应商捆绑包.制作的包包括:

home.bundle.js
product.bundle.js
cart.bundle.js
vendors~cart~home~product.bundle.js
vendors~cart~product.bundle.js
Run Code Online (Sandbox Code Playgroud)

所以基本上主页模板应该引用home.bundle.js,vendor~cart~home~product.bundle.js,而不是第二个供应商包.只有购物车和产品模板才能引用两个供应商包.我正在利用HtmlWebpackPlugin的chunks选项,但无法获取它来提取正确的供应商包,除非我明确引用它的名称,如下所示:

chunks: ['vendors~cart~home~product.bundle','home']
Run Code Online (Sandbox Code Playgroud)

但是这有点挫败了动态呈现脚本标签的目的.我已经尝试创建供应商入口点,但这会将我的所有供应商整合在一起.有一些我缺少的简单配置吗?

我的webpack.config.js:

const path = require('path');
const webpack = require('webpack');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const Visualizer = require('webpack-visualizer-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
    mode: 'development',
    devtool: 'cheap-module-eval-source-map',
    entry: {
        home: './src/js/page-types/home.js',
        product: './src/js/page-types/product.js',
        cart: './src/js/page-types/cart.js'
    },
    output: {
        filename: '[name].bundle.js',
        path: path.resolve(__dirname, 'dist/js')
    },
    optimization: {
        splitChunks: {
            chunks: 'all'
        }
    },
    plugins: [
        new CleanWebpackPlugin(['dist']),
        new Visualizer(),
        new HtmlWebpackPlugin({
            filename: 'home.html',
            chunks: ['vendors','home']
        }),
        new HtmlWebpackPlugin({
            filename: 'product.html', …
Run Code Online (Sandbox Code Playgroud)

javascript build-tools webpack html-webpack-plugin webpack-4

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

使用带有npm run-script的node-sass watch选项

所以我在npm包脚本中运行任务,但我想传递watch选项npm start.

这有效:

"scripts": {
  "scss": "node-sass src/style.scss dist/style.css -w"
}
Run Code Online (Sandbox Code Playgroud)

这不会编译,监视或抛出任何错误:

"scripts": {
  "scss": "node-sass src/style.scss dist/style.css",
  "start": "parallelshell \"npm run scss -- -w\""
}
Run Code Online (Sandbox Code Playgroud)

没有parallelshell无论是否有简写都行不通.

我假设问题是运行脚本在引号中传递额外的参数,所以命令如下:

node-sass src/style.scss dist/style.css "-w"
Run Code Online (Sandbox Code Playgroud)

我希望这可以在不添加任何依赖项的情况下工作.我错过了什么?

顺便说一句,我在Windows 10中使用命令提示符/ git bash.

sass build-tools node.js npm node-sass

22
推荐指数
2
解决办法
2万
查看次数

Gradle:查找使用+导入的依赖项的已解析版本

我想dependency在gradle中打印最后一个版本.

我以这种方式添加了我的依赖:

compile 'test:test:+'
Run Code Online (Sandbox Code Playgroud)

现在我想打印我的依赖版本,因为我想知道我正在使用哪个版本.

我正在以这种方式使用它:

gradle dependencyInsight --configuration compile --dependency test:test
Run Code Online (Sandbox Code Playgroud)

但我的输出是这样的:

+--- test:test:+ -> project : (*)
Run Code Online (Sandbox Code Playgroud)

无论如何,我可以得到我的依赖的真实版本,而不是+

java android build-tools gradle android-gradle-plugin

20
推荐指数
3
解决办法
3551
查看次数

无法在Windows上编译Rust hello world:找不到链接器link.exe

我已经从Rust安装页面在Windows上安装了Rust 。安装后,我尝试运行“ hello world”程序,但收到以下错误。

>cargo run
Run Code Online (Sandbox Code Playgroud)

错误

Compiling helloworld v0.1.0 (C:\Users\DELL\helloworld)

error: linker `link.exe` not found
note: The system cannot find the file specified. (os error 2)
note: the msvc targets depend on the msvc linker but `link.exe` was not found
note: please ensure that VS 2013, VS 2015 or VS 2017 was installed with the Visual C++ option
error: aborting due to previous error
error: Could not compile `helloworld`.

To learn more, run the command again with …
Run Code Online (Sandbox Code Playgroud)

installation compiler-errors linker-errors build-tools rust

18
推荐指数
7
解决办法
5796
查看次数

在大型项目中选择Scons和Waf

我们正在考虑将一个非常大的项目从使用GNU Make转换为更现代的构建工具.我目前的建议是使用SCons或Waf.

目前:

  • 建造时间约为15分钟.
  • 大约100名开发人员
  • 大约10%的代码是C/C++/Fortran休息是Ada(使用gnatmake).

改进的潜在希望/收益是

  • 共享编译器缓存可缩短构建时间并需要磁盘空间
  • 维护更方便

SCons能否很好地完成这项任务?我已经看到它的评论没有缩放,也不像Waf.然而,这些已经有几年了.过去几年中,scons的表现有所增加吗?如果没有,与Waf相比,其表现不佳的原因是什么?

python caching build-tools scons waf

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

如何在Android Studio 3.0.1中更改构建工具版本?

我刚刚将我的Android工作室从2.3升级到3.0.1.但我收到此错误消息(我已经安装了API 27)并且不知道如何修复它,因为我在新版本的android studio中找不到构建工具版本!

Error:Failed to find Build Tools revision 26.0.2 <a href="install.build.tools">Install Build Tools 26.0.2 and sync project</a>
Run Code Online (Sandbox Code Playgroud)

gradle文件已更改,项目结构也只有一个选项卡!

编辑:这是`app/build.gradle的内容:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.m.finalocr"
        minSdkVersion 21
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.0.2'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
Run Code Online (Sandbox Code Playgroud)

如你所见,其中没有buildToolsVersion.那么,当我的计算机上安装了27版本时,为什么我的android工作室会查找这个特定版本(26)?另外,我在哪里可以看到buildToolsVersion "26.0.2" and change it …

configuration build-tools android-studio

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

JavaScript构建工具的目的是什么?

最近我一直在研究Node.js. 在这段时间里,我听到很多关于使用Gulp或Grunt作为构建工具的信息.现在我有兴趣学习如何使用Gulp.我听说它是​​一个构建工具,但我不确定所涵盖的内容.使用像Gulp这样的构建工具可以帮助我进行开发,我会做什么(什么样的任务)?一些例子会很好.

build-tools gulp

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

Visual Studio 2019 中需要 Dumpbin.exe、editbin.exe 包吗?

我对 Visual Studio 2019 进行了相当完整的安装,但缺少我在 Visual Studio 2017 中拥有的 dumpbin.exe 和 editbin.exe 等工具。(缺少含义:在开发人员命令提示符中不可调用,也无法使用类似工具在 HD 上找到一切。)

根据 MSDN,他们有一个名为“附加 MSVC 构建工具”的部分,但在查看 Visual Studio 安装程序时,我无法从中做出任何事情。(参见https://docs.microsoft.com/en-us/cpp/build/reference/editbin-reference?view=vs-2019

我在安装过程中缺少哪个包/组件?

build-tools visual-studio-2019

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

找不到 v143 的构建工具 - 已安装构建工具并使用正确的 VS 版本

这与无法找到 MS 构建工具的其他问题类似,但就我而言,我已经安装了构建工具,并且我在 Windows 10 上为指定工具 (VS2022) 使用正确的 VS 版本。

当我尝试在 VS2022 中构建最初使用 VS2010 开发但升级为使用 v143 构建工具的 C++ 项目时,出现错误消息“找不到 v143 的构建工具”。

我安装了以下内容:

VS 安装程序 - 组件(编译器、构建工具和运行时)

VS 安装程序 - 组件(开发活动)

谁能解释为什么会发生这种情况并提供解决方案?

c++ ide build-tools visual-studio visual-studio-2022

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