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

NDK 2.0.0 fails to installs as part of Android Studio 1.5.1 (Download finished with wrong size) #25

Closed
swisspol opened this issue Mar 16, 2016 · 15 comments
Labels

Comments

@swisspol
Copy link

image

image

Observed on OS X 10.10.5. Tried 3 times to update without success.

@swisspol
Copy link
Author

The ZIP file on disk in ~/Library/Android/sdk/temp is indeed 772,313,856 bytes.

@DanAlbert
Copy link
Member

2.0? What is studio doing?

I've let the studio folks know.

@swisspol
Copy link
Author

The previous version installed as part of Android Studio was 1.0 - it's the "NDK bundle" for Android Studio though, so I guess that's why it has its own versioning scheme:

image

@swisspol
Copy link
Author

Also note that the old Android SDK Manager does not report that there's an update available for the NDK bundle, contrary to the "Android SDK" pane in Android Studio. This is all very confusing...

@swisspol
Copy link
Author

I just tried on a completely new Mac running 10.11.3, installing Android Studio from scratch, then attempting to install NDK 2.0.0, same download error.

Finally, it's worth noting that the android-ndk-r11-darwin-x86_64.zip file downloaded by Android Studio doesn't match either the file size of the one from http://developer.android.com/ndk/downloads/index.html.

@DanAlbert
Copy link
Member

Oh, I'm certain the bug is on our end, not yours :) I'm talking with the studio folks about it right now to narrow down where the problem is.

Finally, it's worth noting that the android-ndk-r11-darwin-x86_64.zip file downloaded by Android Studio doesn't match either the file size of the one from http://developer.android.com/ndk/downloads/index.html.

That's actually #22. Should be fixed tomorrow morning.

@swisspol
Copy link
Author

OK! BTW side question, my understanding is that the previous NDK bundled with Android Studio was defaulting to GCC. Is the new one going to default to Clang to follow the NDK recommendations? And if that's not the case, how to do I configure the gradle settings file in Android Studio project to use Clang?

Here's my current NDK entry in Gradle's settings file (some lines removed for clarity):

android.ndk {
        platformVersion = "18"  // Must be in-sync with minSdkVersion.apiLevel
        moduleName = "jni"
        CFlags.add("-std=c99")

        cppFlags.add("-std=c++11")
        cppFlags.add("-fexceptions")
        cppFlags.add("-frtti")

        stl = "c++_shared"  // http://developer.android.com/ndk/guides/cpp-support.html
        ldFlags.add("-Wl,--gc-sections")
        ldLibs.add("log")
    }

@DanAlbert
Copy link
Member

So, for the main question here: it's actually that older versions of Android Studio are fed from a different set of data (not all packages are going to be valid for every version of Studio), and that data didn't get updated. People are fixing it now, but if you want an immediate fix, update to a newer version of Android Studio.

@DanAlbert
Copy link
Member

FYI, r11b is now live: http://developer.android.com/ndk/downloads/index.html#download

The data for the older versions of Studio should also be fixed (I know I fixed it, I just don't know if that data goes live on a different schedule), so give that a try.

@DanAlbert
Copy link
Member

Of course, right after I posted that I was told that those are actually broken right now. Working on a fix...

@DanAlbert
Copy link
Member

Okay, the new download should be live in 10 minutes. Unfortunately you'll need to manually uninstall and reinstall "r11" to get r11b due to some technical issues with the SDK manager :(

Alternatively, the Studio folks tell me that the version of Studio in the preview channel is getting very close to release, so you could also just update now and avoid the hassle.

@swisspol
Copy link
Author

I don't understand: I successfully installed 11.0.0 this morning in Android Studio:

image

Do I need to uninstall and re-install it (what wrong with 11.0.0 anyway?) or is only for direct downloads?

@DanAlbert
Copy link
Member

Changelog is here: http://developer.android.com/ndk/downloads/index.html It's missing the detail that we fixed issue #6. If you don't use ASAN or ndk-gdb, r11 is just fine.

Yes, you'll need to uninstall and reinstall to pick up r11b. Direct downloads are unaffected (the problem is a "bug" in the SDK manager used by Android Studio versions < 2, including the standalone SDK manager).

@swisspol
Copy link
Author

I just installed updated the NDK on another Android Studio machine which still had 1.0.0. It now says 11.0.0, not 11.0.0b or something. Are you saying you have 2 versions called the exact same 11.0.0 for Android Studio, but one is r11 while the other is r11b under the hood?

@DanAlbert
Copy link
Member

Correct. I know it's ugly and confusing, but it's actually the best we could do with the old SDK manager because the schema (which is a defined interface with the already shipped version of Studio) doesn't allow anything but integer release numbers...

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

2 participants