2015-08-10 14 views
25

Heute habe ich mein Android-Studio auf 1.3 aktualisiert und ich gebe den NDK-Pfad (android-ndk-r10e NDK-Version) in local.properties (ndk.dir = C: \ AndroidNDK \ android-ndk-r10e \ android-ndk-r10e), aber ich habe diesen Fehler bekommen.NDK-Integration in Android-Studio

Fehler: Ausführung fehlgeschlagen für Task ': app: compileDebugNdk'.

Error: NDK integration is deprecated in the current plugin. Consider trying the new experimental plugin. For details, see http://tools.android.com/tech-docs/new-build-system/gradle-experimental . Set "android.useDeprecatedNdk=true" in gradle.properties to continue using the current NDK integration.

mir bitte helfen, dieses Problem zu lösen

Antwort

31

Set android.useDeprecatedNdk=true in gradle.properties weiterhin die aktuelle NDK Integration verwenden.

Sie müssen nur die Anweisung befolgen, die Ihnen in dem Fehler gegeben wird.

+14

Im Namen @ user.clics : Es gibt keine Datei namens gradle.properties. Einen zu erstellen und den Text manuell hinzuzufügen, scheint nicht zu helfen. – Mogsdad

+1

Ich habe dasselbe Problem Ich migriere das Eclipse-Projekt in Studio, aber Stahl bekam den gleichen Fehler, Eine andere Sache, die ich nicht finden kann, die Datei gradle.properties in meinem Projekt, so habe ich diese Datei manuell hinzugefügt, aber Stahl kann nicht erfolgreich sein. Hilf mir. –

+0

Wechseln Sie auf Android-Registerkarte, dann in Gradle Skripte finden Sie gradle-wrapper.properties dort bearbeiten Sie diese Eigenschaft. Ich hatte das gleiche Problem und es hat für mich funktioniert. hoffe, es hilft –

-1

r10e ist in Ordnung auf CLI mit Gradlew.

r10e ist mit Android Studio-Version von gradle (Gradl-2.4 in AS-1.3)

solange man noch die approach mention here von 'ph0b' verwenden fein. Sehen Sie sich die "Beispieldatei" an und beachten Sie, dass IMO und vielleicht auch in seiner Sicht - Sie wollen immer noch nicht den Standard-AS-ndk-Prozess (Sie wollen einige zusätzliche Konfig arbeiten und behalten die volle Kontrolle) .Ph0b Blogs auf ndk zeigen wie man alles selbst macht und sich nicht auf die android.mk gen AS verlässt. Ich benutze immer noch meine eigene Exec für ndk und meine eigenen make-Dateien, wie von ph0b erklärt. Alles gut mit R10e/AS 1.3 auf Linux.

mein CLI stdout ....

:app:ndkBuild 
make: Entering directory `/home/rob/src/speechnw/app/src/main/jni' 
[armeabi-v7a] Compile thumb : audioboo-ogg <= bitwise.c 
[armeabi-v7a] Compile thumb : audioboo-ogg <= framing.c 
[armeabi-v7a] StaticLibrary : libaudioboo-ogg.a 
[armeabi-v7a] Compile thumb : audioboo-flac <= bitmath.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= bitreader.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= cpu.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= crc.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= fixed.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= float.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= format.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= lpc.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= md5.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= memory.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= metadata_iterators.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= metadata_object.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= ogg_decoder_aspect.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= ogg_encoder_aspect.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= ogg_helper.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= ogg_mapping.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= stream_decoder.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= stream_encoder.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= stream_encoder_framing.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= window.c 
[armeabi-v7a] Compile thumb : audioboo-flac <= bitwriter.c 
[armeabi-v7a] StaticLibrary : libaudioboo-flac.a 
[armeabi-v7a] Compile++ thumb: audioboo-native <= FLACStreamEncoder.cpp 
[armeabi-v7a] Compile++ thumb: audioboo-native <= FLACStreamDecoder.cpp 
[armeabi-v7a] Compile++ thumb: audioboo-native <= util.cpp 
[armeabi-v7a] StaticLibrary : libstdc++.a 
[armeabi-v7a] SharedLibrary : libaudioboo-native.so 
[armeabi-v7a] Install  : libaudioboo-native.so => libs/armeabi-v7a/libaudioboo-native.so 
[x86] Compile  : audioboo-ogg <= bitwise.c 
[x86] Compile  : audioboo-ogg <= framing.c 
[x86] StaticLibrary : libaudioboo-ogg.a 
[x86] Compile  : audioboo-flac <= bitmath.c 
[x86] Compile  : audioboo-flac <= bitreader.c 
[x86] Compile  : audioboo-flac <= cpu.c 
[x86] Compile  : audioboo-flac <= crc.c 
[x86] Compile  : audioboo-flac <= fixed.c 
[x86] Compile  : audioboo-flac <= float.c 
[x86] Compile  : audioboo-flac <= format.c 
[x86] Compile  : audioboo-flac <= lpc.c 
[x86] Compile  : audioboo-flac <= md5.c 
[x86] Compile  : audioboo-flac <= memory.c 
[x86] Compile  : audioboo-flac <= metadata_iterators.c 
[x86] Compile  : audioboo-flac <= metadata_object.c 
[x86] Compile  : audioboo-flac <= ogg_decoder_aspect.c 
[x86] Compile  : audioboo-flac <= ogg_encoder_aspect.c 
[x86] Compile  : audioboo-flac <= ogg_helper.c 
[x86] Compile  : audioboo-flac <= ogg_mapping.c 
[x86] Compile  : audioboo-flac <= stream_decoder.c 
[x86] Compile  : audioboo-flac <= stream_encoder.c 
[x86] Compile  : audioboo-flac <= stream_encoder_framing.c 
[x86] Compile  : audioboo-flac <= window.c 
[x86] Compile  : audioboo-flac <= bitwriter.c 
[x86] StaticLibrary : libaudioboo-flac.a 
[x86] Compile++  : audioboo-native <= FLACStreamEncoder.cpp 
[x86] Compile++  : audioboo-native <= FLACStreamDecoder.cpp 
[x86] Compile++  : audioboo-native <= util.cpp 
[x86] StaticLibrary : libstdc++.a 
[x86] SharedLibrary : libaudioboo-native.so 
[x86] Install  : libaudioboo-native.so => libs/x86/libaudioboo-native.so 
make: Leaving directory `/home/rob/src/speechnw/app/src/main/jni' 
:app:compileDebugJava 
4

In folgendem Code in Ihrem build.gradle

sourceSets { 
     main { 
      jni.srcDirs = [] 
     } 
    } 

Dies Ihr Problem lösen kann ..

Verwandte Themen