Android Studio開發之JNI開發之 SPI開發報錯

報錯信息:Error:(42, 21) error: unexpected type name '__u8': expected expression

備註:我使用ndk-r16b版本進行編譯相關的SPI代碼。主要是下面這句代碼出錯:

ioctl(fd, SPI_IOC_WR_MODE, &mode)

截圖:

//

解決方式:

更換ndk版本,使用ndk-r20.重新編譯,可以解決問題。

但是使用從網絡load下來的ndk-r20版本,你可能會遇到這個問題:

Error:A problem occurred configuring project ':app'. > No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android
解決方式:參考下面這個博客,希望可以幫助你。

https://blog.csdn.net/qq_41811438/article/details/103506791

 

---- The End. 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章