网上下了一个Android源码,导入Android Studio中之后无法调试,其中有问题的代码是这样的:
public native String decode(byte[] data, int width, int height, boolean isCrop, int x, int y, int cwidth, int cheight);
错误提示为:
Cannot resolve corresponding JNI function Java_com_keepassdroid_crypto native_AesCipherSPI_Update
Reports native method declaration in Java where no corresponding JNI function is found in the project.
解决办法:
1.File—>Settings—>Plugins,将Android NDK Support(如下图中第一项)后面的对勾去掉。
2.重新启动Android Studio并加载project。