我有一个正在运行的项目,但是Android Studio显示断点存在一些问题,因此我在Mac上卸载了Android Studio,重新安装并打开了相同的工作项目。奇怪的是,它给出了以下错误,我对此无能为力。建议的在线修复程序似乎都无法解决问题。
卸载第一个Android Studio版本是否有关系?
我的项目代码绝对没有变化。同一项目在我队友的Android Studio上运行良好。以下是我遇到的错误:
“在ABI的NDK工具链文件夹中找不到前缀为mipsel-linux-android的工具链”
org.gradle.api.ProjectConfigurationException:发生问题 配置项目':app'。 在org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:94) 在org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:89) 在org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluator.java:76) 在org.gradle.configuration.project.LifecycleProjectEvaluator.access $ 000(LifecycleProjectEvaluator.java:33) 在org.gradle.configuration.project.LifecycleProjectEvaluator $ 1.execute(LifecycleProjectEvaluator.java:53) 在org.gradle.configuration.project.LifecycleProjectEvaluator $ 1.execute(LifecycleProjectEvaluator.java:50) 在org.gradle.internal.Transformers $ 4.transform(Transformers.java:169) 在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106) 在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61) 在org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:50) 在org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:628) 在org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:129) 在org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:35) 在org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:62) 在org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:38) 在org.gradle.initialization.DefaultGradleLauncher $ 1.execute(DefaultGradleLauncher.java:161) 在org.gradle.initialization.DefaultGradleLauncher $ 1.execute(DefaultGradleLauncher.java:158) 在org.gradle.internal.Transformers $ 4.transform(Transformers.java:169) 在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106) 在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56) 在org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:158) 在org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:119) 在org.gradle.initialization.DefaultGradleLauncher.getBuildAnalysis(DefaultGradleLauncher.java:107) 在org.gradle.launcher.exec.GradleBuildController.configure(GradleBuildController.java:79) 在org.gradle.tooling.internal.provider.runner.ClientProvidedBuildActionRunner.run(ClientProvidedBuildActionRunner.java:60) 在org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) 在org.gradle.tooling.internal.provider.runner.RunAsBuildOperationBuildActionRunner $ 1.execute(RunAsBuildOperationBuildActionRunner.java:43) 在org.gradle.tooling.internal.provider.runner.RunAsBuildOperationBuildActionRunner $ 1.execute(RunAsBuildOperationBuildActionRunner.java:40) 在org.gradle.internal.Transformers $ 4.transform(Transformers.java:169) 在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106) 在org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56) 在org.gradle.tooling.internal.provider.runner.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:40) 在org.gradle.tooling.internal.provider.runner.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:75) 在org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) 在org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41) 在org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26) 在org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75) 在org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49) 在org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:44) 在org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:29) 在org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67) 在org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) 在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 在org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:47) 在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 在org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26) 在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 在org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34) 在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 在org.gradle.launcher.daemon.server.exec.ForwardClientInput $ 2.call(ForwardClientInput.java:74) 在org.gradle.launcher.daemon.server.exec.ForwardClientInput $ 2.call(ForwardClientInput.java:72) 在org.gradle.util.Swapper.swap(Swapper.java:38) 在org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72) 在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 在org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55) 在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 在org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60) 在org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) 在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 在org.gradle.launcher.daemon.server.exec.FoundBuildEnvironment.doBuild(BuildBuildEnvironment.java:72)处 在org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) 在org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 在org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy $ 1.run(StartBuildOrRespondWithBusy.java:50) 在org.gradle.launcher.daemon.server.DaemonStateCoordinator $ 1.run(DaemonStateCoordinator.java:297) 在org.gradle.internal.concurrent.ExecutorPolicy $ CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54) 在org.gradle.internal.concurrent.StoppableExecutorImpl $ 1.run(StoppableExecutorImpl.java:40) 在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617) 在java.lang.Thread.run(Thread.java:745) 原因:java.lang.RuntimeException:在NDK工具链文件夹中找不到前缀为mipsel-linux-android的ABI的工具链。 在com.android.build.gradle.internal.ndk.DefaultNdkInfo.getDefaultToolchainVersion(DefaultNdkInfo.java:330) 在com.android.build.gradle.internal.ndk.DefaultNdkInfo.getToolchainPath(DefaultNdkInfo.java:207) 在com.android.build.gradle.internal.ndk.DefaultNdkInfo.getStripExecutable(DefaultNdkInfo.java:300) 在com.android.build.gradle.internal.ndk.NdkHandler.getStripExecutable(NdkHandler.java:333) 在com.android.build.gradle.internal.transforms.StripDebugSymbolTransform。(StripDebugSymbolTransform.java:73) 在com.android.build.gradle.internal.TaskManager.createStripNativeLibraryTask(TaskManager.java:1339) 在com.android.build.gradle.internal.ApplicationTaskManager.createTasksForVariantData(ApplicationTaskManager.java:289) 在com.android.build.gradle.internal.VariantManager.createTasksForVariantData(VariantManager.java:485) 在com.android.build.gradle.internal.VariantManager $ 3.call(VariantManager.java:293) 在com.android.build.gradle.internal.VariantManager $ 3.call(VariantManager.java:290) 在com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156) 在com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:120) 在com.android.build.gradle.internal.profile.SpanRecorders.record(SpanRecorders.java:44) 在com.android.build.gradle.internal.VariantManager.createAndroidTasks(VariantManager.java:286) 在com.android.build.gradle.BasePlugin $ 11.call(BasePlugin.java:688) 在com.android.build.gradle.BasePlugin $ 11.call(BasePlugin.java:685) 在com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156) 在com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:120) 在com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:683) 在com.android.build.gradle.BasePlugin $ 10.call(BasePlugin.java:608) 在com.android.build.gradle.BasePlugin $ 10.call(BasePlugin.java:605) 在com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156) 在com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:120) 在com.android.build.gradle.BasePlugin.lambda $ createTasks $ 1(BasePlugin.java:603) 在org.gradle.internal.event.BroadcastDispatch $ ActionInvocationHandler.dispatch(BroadcastDispatch.java:93) 在org.gradle.internal.event.BroadcastDispatch $ ActionInvocationHandler.dispatch(BroadcastDispatch.java:82) 在org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:44) 在org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:79) 在org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:30) 在org.gradle.internal.dispatch.ProxyDispatchAdapter $ DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93) 在com.sun.proxy。$ Proxy16.afterEvaluate(未知来源)
答案 0 :(得分:0)
升级您的Gradle插件
classpath 'com.android.tools.build:gradle:3.2.1'
或转到:
~/Library/Android/sdk/ndk-bundle
并下载NDK 17 https://developer.android.com/ndk/downloads/older_releases
使用新的NDK 17更改/ android / sdk / ndk-bundle中的NDK
并将类路径更改为:
classpath 'com.android.tools.build:gradle:2.2.2'
快乐编码:)
答案 1 :(得分:0)
根据https://github.com/android-ndk/ndk/wiki/Changelog-r18#known-issues
此NDK版本与Android Gradle插件版本3.0或更旧版本不兼容。如果在ABI的NDK工具链文件夹中看到前缀为mips64el-linux-android的错误消息,例如在NoDK中找不到工具链,请更新项目文件以使用3.1或更高版本的插件。您还需要升级到Android Studio 3.1或更高版本。
解决方法如下: (https://stackoverflow.com/a/51852529/8034839)
选项1:
subjects = {
"o": 0,
"r": 0,
"w": 0,
"c": 0,
"chi": 0
}
while True:
choice = input("Enter your choice: ")
if choice not in subjects.keys():
print("Valid choices are: {}".format(",".join(subjects.keys())))
continue
subjects[choice] += 1
print(subjects)
选项2:
buildTypes {
debug {
externalNativeBuild {
cmake {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
}
}
release {
externalNativeBuild {
cmake {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
}
}
}