我是Android NDK开发的新手。今天我通过Android Studio向导设置了一个项目,与常见的Sdk开发有什么不同,我检查了“Include C ++ Support”。然后进入开发区,它告诉我gradle sync失败---“错误:预计调用者确保有效的ABI :ARM64_V8A“。
我的发展环境是:
Android Studio2.2.2
JRE:1.8.0
操作系统:Windows 10家族版
错误日志如下:
var hub;
var url = 'http://localhost:44317/signalr';
$.connection.hub.logging = true;
$.connection.hub.url = url;
var hub = $.connection.MyHub;
hub.client.ChangeStatus = function (status) {
alert('new Status' + status);
};
$.connection.hub.start()
.done(function () {
alert('Now connected');
hub.invoke('CheckConnectionStatus', '1');
})
.fail(function () { alert('Could not Connect!'); });
经过仔细搜索后,我发现它在build.gradle(app)中添加了一些内容
2016-11-23 11:35:03,111 [12186031] WARN - nal.AbstractExternalSystemTask - Expected caller to ensure valid ABI: ARM64_V8A
com.intellij.openapi.externalSystem.model.ExternalSystemException: Expected caller to ensure valid ABI: ARM64_V8A
at org.jetbrains.plugins.gradle.service.project.AbstractProjectImportErrorHandler.createUserFriendlyError(AbstractProjectImportErrorHandler.java:106)
at org.jetbrains.plugins.gradle.service.project.BaseProjectImportErrorHandler.getUserFriendlyError(BaseProjectImportErrorHandler.java:158)
at org.jetbrains.plugins.gradle.service.project.BaseGradleProjectResolverExtension.getUserFriendlyError(BaseGradleProjectResolverExtension.java:579)
at org.jetbrains.plugins.gradle.service.project.AbstractProjectResolverExtension.getUserFriendlyError(AbstractProjectResolverExtension.java:158)
at com.android.tools.idea.gradle.project.AndroidGradleProjectResolver.getUserFriendlyError(AndroidGradleProjectResolver.java:405)
at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver$ProjectConnectionDataNodeFunction.fun(GradleProjectResolver.java:772)
at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver$ProjectConnectionDataNodeFunction.fun(GradleProjectResolver.java:752)
at org.jetbrains.plugins.gradle.service.execution.GradleExecutionHelper.execute(GradleExecutionHelper.java:238)
at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:112)
at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:73)
at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl$1.produce(RemoteExternalSystemProjectResolverImpl.java:41)
at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl$1.produce(RemoteExternalSystemProjectResolverImpl.java:37)
at com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:59)
at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolverImpl.java:37)
at com.intellij.openapi.externalSystem.service.remote.wrapper.ExternalSystemProjectResolverWrapper.resolveProjectInfo(ExternalSystemProjectResolverWrapper.java:49)
at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:51)
at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:138)
at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:124)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:419)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$4$2.run(ExternalSystemUtil.java:500)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:563)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:142)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:446)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:127)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:126)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:369)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
删除后,没关系。它的内容如下:
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
我已将其报告给Android Studio bug report。
我不知道这是不是我的错。感谢任何解释。
答案 0 :(得分:2)
今天,当我导入" echo"一个例子,它警告我
错误:E:\ Android_Sdk \ ndk-bundle \ sources \ cxx-stl \ llvm-libc ++ \ libs \ armeabi-v7a \ libc ++ _ shared.so
中预期的NDK STL共享对象文件
搜索我的计算机和另一台计算机ndk-build目录后,我发现了问题。 这是由于我的粗心造成的,我从另一台计算机上复制了ndk-build目录,但它并不是一个很好的副本。再次复制后,问题被驳回。
我为我的疏忽感到非常抱歉。我不知道是否需要删除此帖子。如有需要,请随时告诉我。