问题标签 [gradle-experimental]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
android - gradle-experimental:0.1.0 buildConfigField
有人知道如何buildConfigField
在实验性 gradle 插件中定义吗?
给出:
错误:尝试读取给定规则“model.android.productFlavors”的“java.lang.Object”类型模型的只写视图
android - lintOptions for experimental Gradle build tool in Android Studio 1.3
As Android Studio 1.3 coming with NDK support, I tried to convert my Gradle scripts (build.gradle app/build.gradle and gradle-wrapper.properties) following this link http://tools.android.com/tech-docs/new-build-system/gradle-experimental.
However, I cannot find any guidance about lintOptions from both the tutorial as well as ndk example repository https://github.com/googlesamples/android-ndk
My app/build.gradle
The sync failed with log: Error:Cause: com.android.build.gradle.managed.AndroidConfig_Impl
If I remove the lintOptions block, it seems to sync OK but build fails later.
android - Issue when migrating to Gradle Experimental 2.5 : no such method AndroidConfig
I have just updated my Android Studio setup to 1.3 (latest stable as of 31st of August 2015) and I need to use the latest NDK integration. My previous Android Studio version was 1.2.1 (stable as well).
Following Google Migration to Gradle Experimental Guide I managed to easily adapt my various gradle scripts.
However, Gradle Sync fails with the following error :
[Update 1 -> see below, error updated]
When I attempt to Make
the project, I obtain a little more detailed error :
App refers to the main application code (with activities and other).
Using the feature F4 > Jumping to Source
, it opens my build.gradle
script from my app
project.
This is the content of the aforementioned script :
As you can see, there is nothing very fancy here. But you might notice there is some unit testing setup :
androidTestCompile
could not be resolved while migrating to GradleExperimental so I modified following a solution I can no longer find (sorry) where I would simple put compile
in stead of androidTestCompile
.
This was the error :
I tried to compare one of Google's NDK sample (hello-jini
for example) as provided in the aforemention guide and available here.
Except the packagingOptions
I could not find any differences that would be responsible for my awry. I tried to remove packagingOptions
but that did not make a single change at all.
[UPDATE 1]
You will notice that the more detailed error message states that it's in line #17 which is where I declare my native build settings.
I fixed the error which was cFlags
must be changed to CFlags
and I added the =
as required by the new version of Gradle.
This did help, the error does not appear anymore but changed for :
android - 在 android studio 上使用 NDK 构建原生 openCV
我正在制作一个使用 openCV 的 C++ 项目,我希望使用 android NDK 支持在 android studio 上构建它。
这样做我发现只有 gradle 的实验版本支持 NDK。我目前正在使用 0.2.1 版的 gradle。我将 opencv 作为模块导入,并将库复制到 src/main/ 下的 jniLibs 文件夹
我试图编译它,但我遇到了某些错误,例如对 libopencv_core.a 的 parallel.cpp 中某些函数的未定义引用。他们在导入第三方库时得到了解决:libtbb.a
但是在运行它时,我得到了以下错误:
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__gnu_thumb1_case_si" referenced by "libtracking_bits.so"
这是我的 build.gradle :
我被困住了。请帮忙。
android - Gradle (android 实验插件) 忽略项目依赖
我在以下项目结构中使用 Gradle Android Experimental 插件:
设置.gradle
构建.gradle
应用程序/build.gradle
我的图书馆/build.gradle
图书馆项目构建得非常好。在 Android Studio 中,它不会显示任何错误。但是,当尝试使用 Gradle 构建这个项目时,它只会尝试构建app
项目并且实际上会忽略my-library
依赖关系,呈现类未找到错误。
如何解决这个问题?
android - gradle 和 gradle-experimental 有什么区别?
我知道新版本都支持 Android 应用程序的 NDK。但是许多插件不适用于 gradle-experimental。
android - 将 productFlavor 添加到实验性 Android gradle 插件库
我有一个使用实验性 gradle 插件的项目,即0.2.0
. 当我没有productFlavor
时,我可以在 Android Studio 中完美地集成一个库模块,并且一切正常。但是当库有 时productFlavor
,我的主项目找不到库类。
此修复似乎不适用于实验性 gradle 插件。有谁知道如何使口味与新插件一起使用?
图书馆:
项目:
android - 在 gradle experimental 中使用预编译头文件
我想在每个标题中包含一个文件“abc.h”。那么,我应该如何包含这个预编译的头文件。我搜索了这样的东西
但它不起作用。还有如何移植 LOCAL_EXPORT_C_INCLUDES?
android - 如何仅针对 ARM 目标使用 NDK 构建基于 Android Gradle 的应用程序?
我有一个来自供应商的 .so 文件,它只支持“arm”。目前它非常适合我的 Android 应用程序。不知何故,我想使用 Android Studio 模块分离实现,因此我可以按照本教程https://www.youtube.com/watch?v=1i4I-Nph-Cw将模块导出为 Jar 。
当我导出 JAR 时,构建过程返回错误
日志说 gradle 试图针对 mips 构建,但由于库不兼容而失败,因为我只有 arm 库。我的问题是如何跳过针对 mips 的构建过程?或者是否有可能只针对 ARM 架构?
构建.gradle
android - 使用 gradle 实验插件编译 NDK
我正在尝试为我的 NDK 项目使用 Experimental Gradle Plugin,但它不编译 ndk。一切看起来都很好——Android Studio 理解我的 C 代码,可以从 Java 跳转到本机等等,但是当我运行“构建”时,跳过了编译 ndk 的步骤——我看不到像“compileNdk”这样的任务。
当我列出所有可用任务时
也没有像“compileNdk”这样的任务。“Libs”文件夹也是空的,所以当我尝试调用本机方法时,应用程序崩溃并显示“UnsatisfiedLinkError”。
那我错过了什么?如何告诉 gradle 编译 NDK?
我的配置是:
root build.gradle:
模块 build.gradle:
我在 Windows 7 上使用 Android Studio 1.4.1。ndk.dir 指向由 AS 下载的“ndk-bundle”文件夹。
任何帮助表示赞赏!