1. 程式人生 > >由於ndk引發的幾個bug,以及解決方法

由於ndk引發的幾個bug,以及解決方法

問題一:

Error:(12, 0) 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.


其實,最重要的一句話就是最後一句,我們在工程根目錄的gradle.properties檔案中新增android.useDeprecatedNdk=true就可以解決這個問題了

問題二:

Error:Execution failed for task ':rtspCamera:compileDebugNdk'.
> NDK not configured.
Download the NDK from http://developer.android.com/tools/sdk/ndk/.Then add ndk.dir=path/to/ndk in local.properties.(On Windows, make sure you escape backslashes, e.g. C:\\ndk rather than C:\ndk)

解決方法:

工程根目錄的local.properties檔案中新增上你的ndk的路徑就可以了,要按著格式轉意


問題三:

Error:Execution failed for task ':app:compileDebugNdk'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException:
Process 'command 'D:\android-ndk-r9d\ndk-build.cmd'' finished with non-zero exit value

2

解決方法:

應該是當前ndk的問題,我從r9d換成了r10e解決了問題