Hindi mahanap ang CMake sa android studio

ashish mishra 09/15/2017. 3 answers, 4.558 views
android android android-studio android-studio android-ndk android-ndk cmake

Kailangan kong magdagdag ng C / C ++ code sa aking android program kung saan kailangan ko ang LLDB, CMake, at NDK. Natagpuan ko ang LLDB at NDK sa manager ng SDK ngunit nawawala ang CMake mula roon. Sinubukan kong manu-manong i-download ito mula sa opisyal na site ng CMake at nalaman na para sa android kailangan namin ang custom na SDK na CMake.

ipasok ang paglalarawan ng imahe dito

Tulad ng makikita mo walang pagpipilian tulad ng CMake.

Maaari kahit sino tumulong upang makahanap ng bersyon ng CMake para sa Android? Salamat sa advance.

UPDATE

I-edit: Sinubukan ko si CMake mula sa website at ang isang nakita ko sa ndk-bundle / build folder, ngunit kapwa ay nagbibigay ng parehong error tulad ng sa ibaba. Mangyaring tingnan at ipaalam kung maaari kang gumawa ng isang bagay mula dito at tulungan kang malutas ang isyu. Salamat.

Build command failed.

Error while executing 'C:\Users\amishr33\AppData\Local\Android\sdk\cmake\bin\cmake.exe' with arguments {-HC:\Users\amishr33\AndroidStudioProjects\MyApplication\app\src\main\jni -BC:\Users\amishr33\AndroidStudioProjects\MyApplication\app\.externalNativeBuild\cmake\debug\armeabi -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi -DANDROID_NDK=C:\Users\amishr33\AppData\Local\Android\sdk\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\amishr33\AndroidStudioProjects\MyApplication\app\build\intermediates\cmake\debug\obj\armeabi -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=C:\Users\amishr33\AppData\Local\Android\sdk\cmake\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=C:\Users\amishr33\AppData\Local\Android\sdk\ndk-bundle\build\cmake\android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=15 -DCMAKE_CXX_FLAGS=-std=c++11 -DANDROID_TOOLCHAIN=clang -DANDROID_STL=gnustl_static}
CMake Error: Could not create named generator Android Gradle - Ninja
Generators
  Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 12 2013 [arch] = Generates Visual Studio 2013 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 11 2012 [arch] = Generates Visual Studio 2012 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 10 2010 [arch] = Generates Visual Studio 2010 project files.
                                 Optional [arch] can be "Win64" or "IA64".
  Visual Studio 9 2008 [arch]  = Generates Visual Studio 2008 project files.
                                 Optional [arch] can be "Win64" or "IA64".
  Visual Studio 8 2005 [arch]  = Generates Visual Studio 2005 project files.
                                 Optional [arch] can be "Win64".
  Visual Studio 7 .NET 2003    = Deprecated.  Generates Visual Studio .NET
                                 2003 project files.
  Borland Makefiles            = Generates Borland makefiles.
  NMake Makefiles              = Generates NMake makefiles.
  NMake Makefiles JOM          = Generates JOM makefiles.
  Green Hills MULTI            = Generates Green Hills MULTI files
                                 (experimental, work-in-progress).
  MSYS Makefiles               = Generates MSYS makefiles.
  MinGW Makefiles              = Generates a make file for use with
                                 mingw32-make.
  Unix Makefiles               = Generates standard UNIX makefiles.
  Ninja                        = Generates build.ninja files.
  Watcom WMake                 = Generates Watcom WMake makefiles.
  CodeBlocks - MinGW Makefiles = Generates CodeBlocks project files.
  CodeBlocks - NMake Makefiles = Generates CodeBlocks project files.
  CodeBlocks - Ninja           = Generates CodeBlocks project files.
  CodeBlocks - Unix Makefiles  = Generates CodeBlocks project files.
  CodeLite - MinGW Makefiles   = Generates CodeLite project files.
  CodeLite - NMake Makefiles   = Generates CodeLite project files.
  CodeLite - Ninja             = Generates CodeLite project files.
  CodeLite - Unix Makefiles    = Generates CodeLite project files.
  Sublime Text 2 - MinGW Makefiles
                               = Generates Sublime Text 2 project files.
  Sublime Text 2 - NMake Makefiles
                               = Generates Sublime Text 2 project files.
  Sublime Text 2 - Ninja       = Generates Sublime Text 2 project files.
  Sublime Text 2 - Unix Makefiles
                               = Generates Sublime Text 2 project files.
  Kate - MinGW Makefiles       = Generates Kate project files.
  Kate - NMake Makefiles       = Generates Kate project files.
  Kate - Ninja                 = Generates Kate project files.
  Kate - Unix Makefiles        = Generates Kate project files.
  Eclipse CDT4 - NMake Makefiles
                               = Generates Eclipse CDT 4.0 project files.
  Eclipse CDT4 - MinGW Makefiles
                               = Generates Eclipse CDT 4.0 project files.
  Eclipse CDT4 - Ninja         = Generates Eclipse CDT 4.0 project files.
  Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.
Error:executing external native build for cmake C:\Users\amishr33\AndroidStudioProjects\MyApplication\app\src\main\jni\CMakeLists.txt 
2 Comments
Alberto López Pérez 12/23/2016
Aling bersyon ng Android studio ang ginagamit mo? Subukan na i- update to the lastest , sinubukan kong i-update ang aking Android Studio sa 2.2.3 at sa loob ng Android SDK -> Mga tool sa SDK na lumilitaw sa akin bilang makikita mo dito: screenshot Umaasa ako na nakatulong ako m8: D Paumanhin para sa pagsagot sa isang bit late :(
Jon Goodwin 01/11/2017
Gumagamit ka ba ng 32 bit windows? Gumagana lamang ang Android Studio Cmake sa 64 bit machine. Iyon ang dahilan kung bakit hindi mo mahanap ang Cmake sa manager ng SDK.

3 Answers


user2477865 04/04/2017.
  1. Lagyan ng check sa iyong build.gradle file para sa module ng iyong App

    externalNativeBuild {cmake {path "CMakeLists.txt"}}

  2. alisin ang seksyon ng cmake

  3. muling i-sync ang proyekto:
    pumunta sa menu Build -> Refersh Lined C ++ Projects

  4. Mag-right-click sa module, tulad ng module ng app, piliin ang "Link C ++ Project na may Gradle" mula sa menu.

  5. Dapat mong makita ang isang dialog na katulad ng ipinakita sa ibaba figure.

    ipasok ang paglalarawan ng imahe dito

  6. I-click ang OK.


Suriin ito, sa tingin ko ang site na ito ay nagpapaliwanag kung ano ang kailangan mo:

https://codelabs.developers.google.com/codelabs/android-studio-cmake/index.html?index=..%2F..%2Findex#0

Tandaan na suriin ang "Ano ang kakailanganin mo"

I-update:

NDK: https://developer.android.com/ndk/downloads/index.html pinagmulan: https://developer.android.com/ndk/index.html

CMake: https://cmake.org/files/v3.7/cmake-3.7.1-win64-x64.zip source: https://cmake.org/

LLDB (para lamang sa mga sistemang debain): http://apt.llvm.org/ source: http://lldb.llvm.org/download.html

Sa sandaling i-download mo ang mga file na ito, kopyahin sa iyong sdk folder (normal sa: "C: \ android-sdk \") Maaari mong i-localize ang folder dito:

  1. File -> proyekto Istraktura sa Istraktura ng Proyekto
  2. Kaliwa -> SDK Lokasyon

Pagkatapos ay maaari kang magpatuloy sa nakaraang gabay pagkatapos ng pag-download :)

5 comments
ashish mishra 12/19/2016
ngunit hindi ito nagsasabi kung paano / kung saan makakakuha ng CMake para sa android studio.
Alberto López Pérez 12/19/2016
Naghahanap ka ba ng seksyon ng "pag-download"?
Alberto López Pérez 12/19/2016
Lagyan ng check ang link na ito: developer.android.com/studio/projects/add-native-code.html Kung mayroon kang anumang problema, ipaalam sa akin ito at magiging masaya ako upang matulungan ka: D
ashish mishra 12/20/2016
humiling ng seksyon ng pag-download upang buksan ang manager ng SDK at mag-download ng CMake mula sa kanilang ... ngunit walang opsiyong CMake sa manager ng SDK.
1 ashish mishra 12/22/2016
Sinubukan na ko ang bahaging iyon, manu-manong i-download ang cmake mula sa website nito at i-save ito sa sdk folder. ngunit hindi ito gumagana. Ako n aking pananaliksik sa isyung ito nakita ko na ang SDK ay gumagamit ng isang partikular na na-customize na CMake para sa Android, Sinusubukan kong hanapin ang bersyon na iyon ng CMake.

Sylwester Muzyka 01/17/2017.

Ang muling pag-install ng Android Studio ay dapat tumulong. Nagkaroon ako ng parehong problema at muling i-install ang nakatulong sa akin.


HighResolutionMusic.com - Download Hi-Res Songs

1 The Chainsmokers

Beach House flac

The Chainsmokers. 2018. Writer: Andrew Taggart.
2 (G)I-DLE

POP/STARS flac

(G)I-DLE. 2018. Writer: Riot Music Team;Harloe.
3 Ariana Grande

​Thank U, Next flac

Ariana Grande. 2018. Writer: Crazy Mike;Scootie;Victoria Monét;Tayla Parx;TBHits;Ariana Grande.
4 Anne-Marie

Rewrite The Stars flac

Anne-Marie. 2018. Writer: Benj Pasek;Justin Paul.
5 Clean Bandit

Baby flac

Clean Bandit. 2018. Writer: Jack Patterson;Kamille;Jason Evigan;Matthew Knott;Marina;Luis Fonsi.
6 Nicki Minaj

No Candle No Light flac

Nicki Minaj. 2018. Writer: Denisia “Blu June” Andrews;Kathryn Ostenberg;Brittany "Chi" Coney;Brian Lee;TJ Routon;Tushar Apte;ZAYN;Nicki Minaj.
7 BlackPink

Kiss And Make Up flac

BlackPink. 2018. Writer: Soke;Kny Factory;Billboard;Chelcee Grimes;Teddy Park;Marc Vincent;Dua Lipa.
8 Imagine Dragons

Bad Liar flac

Imagine Dragons. 2018. Writer: Jorgen Odegard;Daniel Platzman;Ben McKee;Wayne Sermon;Aja Volkman;Dan Reynolds.
9 BTS

Waste It On Me flac

BTS. 2018. Writer: Steve Aoki;Jeff Halavacs;Ryan Ogren;Michael Gazzo;Nate Cyphert;Sean Foreman;RM.
10 Halsey

Without Me flac

Halsey. 2018. Writer: Halsey;Delacey;Louis Bell;Amy Allen;Justin Timberlake;Timbaland;Scott Storch.
11 Little Mix

Woman Like Me flac

Little Mix. 2018. Writer: Nicki Minaj;Steve Mac;Ed Sheeran;Jess Glynne.
12 Brooks

Limbo flac

Brooks. 2018.
13 Fitz And The Tantrums

HandClap flac

Fitz And The Tantrums. 2017. Writer: Fitz And The Tantrums;Eric Frederic;Sam Hollander.
14 Backstreet Boys

Chances flac

Backstreet Boys. 2018.
15 Lady Gaga

I'll Never Love Again flac

Lady Gaga. 2018. Writer: Benjamin Rice;Lady Gaga.
16 Diplo

Close To Me flac

Diplo. 2018. Writer: Ellie Goulding;Savan Kotecha;Peter Svensson;Ilya;Swae Lee;Diplo.
17 Rita Ora

Velvet Rope flac

Rita Ora. 2018.
18 Bradley Cooper

Always Remember Us This Way flac

Bradley Cooper. 2018. Writer: Lady Gaga;Dave Cobb.
19 Imagine Dragons

Machine flac

Imagine Dragons. 2018. Writer: Wayne Sermon;Daniel Platzman;Dan Reynolds;Ben McKee;Alex Da Kid.
20 Erika Sirola

Speechless flac

Erika Sirola. 2018. Writer: Teemu Brunila;Stefan Dabruck;Jürgen Dohr;Guido Kramer;Dennis Bierbrodt;Chris Braide;Robin Schulz.

Related questions

Hot questions

Language

Popular Tags