Questions tagged [gradle-experimental]

The new experimental gradle plugin for Android

The new experimental plugin is based on Gradle’s new component model mechanism, while allows significant reduction in configuration time. It also includes NDK integration for building JNI applications.

The user guide provides details on how to use it and highlights the difference between the new plugin and the original plugin.

Note that this is plugin is at the experimental stage. The Gradle API for the new component model is not final, which means it’ll only work with a specific version of Gradle until the APIs are final.

Useful links:

107 questions
1
vote
1 answer

Use different gradle build tools in Android Studio module

I've implemented the new experimental build tools (gradle-experimental:0.2.1) for an app with many modules, but the current api is pretty awful and incompatible with certain libraries. I'm curious if it's possible to pull all ndk code into a…
Anthony
  • 7,638
  • 3
  • 38
  • 71
1
vote
1 answer

Flavor dimensions and variant filters for experimental plugin?

Does anyone know the syntax for defining flavor dimensions and variant filters using the experimental Gradle plugin? (This would include the syntax for assigning a flavor to a particular dimension inside each flavor's create() block.) The…
1
vote
1 answer

Building native openCV with NDK on android studio

I am making a C++ project which uses openCV and I wish to build it on android studio using android NDK support. On doing so I found out that only the experimental version of gradle supports NDK. I am currently using version 0.2.1 of gradle. I…
ms95
  • 35
  • 1
  • 5
0
votes
2 answers

How can I codesign a 64-bit Android APK using the Gradle Experimental Plugin?

I am developing a Android apps using Open Frameworks, a C++ framework which supports Android. Its Android projects use the Gradle experimental plugin to allow C++. I have been able to get these to build unsigned APK's that run just fine (using…
0
votes
1 answer

Android Studio: How to use v26.0.1 support libraries with experimental Gradle plugin?

So now that Android O is available via OTA update, I want to move compileSdkVersion to 26, buildToolsVersion to 26.0.1, etc. When I move my support library references to 26.0.1, however, I get "failed to resolve" errors. There are several existing…
0
votes
1 answer

Different library search path for each ABI

Using Android Gradle Experimental plugin version 0.9.1. I need to have different static library search paths for each ABI, is there a way I can achieve this? Here is the build.gradle snippet I have right no, in the line where I add ldFlags I want to…
0
votes
0 answers

JaCoCo test coverage Could not determine the dependencies of task ':createDebugAndroidTestCoverageReport'

I have following problem during execution of 'gradle createDebugCoverageReport': What went wrong: Could not determine the dependencies of task ':createDebugAndroidTestCoverageReport'. java.lang.NullPointerException (no error message) Try: Run…
0
votes
0 answers

Unable to build shaderc with new experimental gradle plugin android studio

I am trying to build shaderc from NDK 12's third party folder. It build properly with "com.android.tools.build:gradle:2.1.3" but gives following error for "com.android.tools.build:gradle-experimental:0.8+" process_begin: CreateProcess(NULL, "", ...)…
0
votes
1 answer

Ndk build with gradle experimental android model plugin causes java.lang.IllegalStateException: FirebaseApp with name [DEFAULT] doesn't exist.

I try to assemble NDK app with Firebase Cloud Messaging using android model plugin with gradle-experimental. When I call FirebaseInstanceId.getInstance().getToken() The Application invokes java.lang.IllegalStateException: FirebaseApp with name…
0
votes
1 answer

Multiple folders under a single module in Android studio

I am trying to structure my project as shown in the image: /src/main/folder_1/file_1.cpp /src/main/folder_2/file_2.cpp But android studio complaints for both file_1.cpp and file2.cpp as "Gradle files have changed since last project sync. A…
RRR
  • 339
  • 1
  • 6
  • 15
0
votes
1 answer

How do I get gradle to run a task before building?

I am working with an ndk project using gradle-experimental. I have a "prebuilt" library that is really a library I generate with a shell call in a gradle task. I am trying to make it very easy for this project to run out of the box, so I need to be…
iHowell
  • 2,263
  • 1
  • 25
  • 49
0
votes
0 answers

Gradle-experimental not compiling ndk resources

I recently switched from using .mk files in my android-ndk project to using a fully gradle solution, with the help of the gradle-experimental plugin. After I did this, I thought it was working, but then I cleaned the project and manually deleted all…
iHowell
  • 2,263
  • 1
  • 25
  • 49
0
votes
1 answer

Gradle build DeployApkTask.perform returns a NullPointerException

I'm building an NDK project with gradle and I'm getting an error when Android Studio tries to put the apk onto my simulator. It reads out that gradle finished building the project, it just won't deploy to the simulator. Here is the…
iHowell
  • 2,263
  • 1
  • 25
  • 49
0
votes
1 answer

Gradle sync error with android.productFlavors setting

I use com.android.tools.build:cradle-experimental:0.7.0. And want to build only for some abi. So I set android.productFlavors as below: productFlavors { // for detailed abiFilter descriptions, refer to "Supported ABIs" @ //…
wudijimao
  • 53
  • 6
0
votes
1 answer

Switching between GCC and Clang when using the Gradle Experimental NDK plug-in in Android Studio

When using the Gradle Experimental NDK plug-in in Android Studio, how do you configure the Gradle build settings to build using Clang vs GCC (which has been deprecated)?
Pol
  • 3,848
  • 1
  • 38
  • 55