Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use Clang as part of Android Studio #28

Closed
swisspol opened this issue Mar 18, 2016 · 9 comments
Closed

Unable to use Clang as part of Android Studio #28

swisspol opened this issue Mar 18, 2016 · 9 comments
Labels

Comments

@swisspol
Copy link

With the previous NDK bundle from Android Studio, you could tell Gradle to use Clang toolchain to compile the JNI library as in:

 android.ndk {
        platformVersion = "18"  // Must be in-sync with minSdkVersion.apiLevel
        moduleName = "jni"
        toolchain "clang"
        toolchainVersion "3.6"
        ...
}

With the new NDK bundle 11.0.0, this doesn't work anymore, with or without toolchainVersion and even if using llvm instead of clang for toolchain.

Gradle sync failed: Cause: org.gradle.api.internal.ExtensibleDynamicObject Consult IDE log for more details (Help | Show Log)

@DanAlbert
Copy link
Member

@vharron

@thielsn
Copy link

thielsn commented Mar 18, 2016

I have the same issue. Also, with the updated Android NDK, Revision 11b.
Gradle plugin: com.android.tools.build:gradle-experimental:0.4.0

@vharron
Copy link

vharron commented Mar 21, 2016

I think you're going to need to upgrade to the latest experimental plugin.

Studio 2.0: com.android.tools.build:gradle-experimental:0.6.0-beta7
Studio 2.1: com.android.tools.build:gradle-experimental:0.7.0-alpha3

@swisspol
Copy link
Author

I have Android Studio 1.5.1, the latest official release with gradle-experimental:0.4.0, the latest non-alpha, beta or whatever version I'm aware of.

How do you know what's the latest experimental gradle available? The official page only lists 0.4.0 and 0.6.0-alpha3: http://tools.android.com/tech-docs/new-build-system/gradle-experimental. This whole thing is such a mess 😞

@vharron
Copy link

vharron commented Mar 21, 2016

I walked over to the gradle lead and asked him. :) It is a mess. Sorry, we're working on it.

@swisspol
Copy link
Author

Please start by spending 10 minutes updating http://tools.android.com/tech-docs/new-build-system/gradle-experimental. The list of versions in "Gradle Requirements", "DSL Change" and "Change Log" are completely out of sync. Just fixing this so there's one source of reliable truth will help a number of people. Thanks!

In the meantime, what's the latest stable version of that plugin I can use with Android Studio 1.5.1?

@gnolnuhc
Copy link

I am trying to use Clang to compile under Android Studio and got the same error.
I am not expecting ndk support under AS to be complete. But I am very curious about the agenda for NDK under AS. When will it become official under stable release of Android Studio?

@DanAlbert
Copy link
Member

@swisspol: sounds like there currently isn't a stable version of the gradle plugin that supports r11

@gnolnuhc: I'm told the stable release is due in a few weeks

@DanAlbert
Copy link
Member

Closing since this isn't an NDK bug.

Gradle/Android Studio bugs should be filed on b.android.com (http://tools.android.com/filing-bugs/studio)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants