【发布时间】:2021-06-17 12:13:11
【问题描述】:
早上好,
我正在 android studio 中开发一个聊天机器人,并将一个 python 脚本集成到我的机器人中。 使用 chaquopy 可以正常工作,但是在我更改应用程序名称后,整个项目停止工作,它给了我这个错误:
Build failed (with 1 error)
:clean (ok)
:app:clean (ok)
:app:preBuild (ok)
:app:preDebugBuild (ok)
:app:compileDebugAidl (ok)
:app:compileDebugRenderscript (ok)
:app:generateDebugBuildConfig (ok)
:app:extractPythonBuildPackages (ok)
:app:generateDebugPythonRequirements
Process 'command 'C:/Users/ashlibek/AppData/Local/Programs/Python/Python38/python.exe''
finished with non-zero exit value 1
Logcat 实在是太长了,我也弄不明白哪里出了问题:
2021-03-20 09:02:44.558 7052-32520/? E/memtrack: Couldn't load memtrack module
2021-03-20 09:02:51.529 14219-15679/? E/msgr.msys: E[N rtchannel]_rt_mqtt_publish_callback(356)=>Failed to publish the request over MQTT. token:624691b3-7763-4912-ac36-fcda5324bd31, category:mcd-sync-data-task-category, requestId:11634, error:Error Domain=mqtt Code=3008
2021-03-20 09:02:51.538 14219-15679/? E/msgr.msys: E[N rtchannel]_rt_mqtt_publish_callback(356)=>Failed to publish the request over MQTT. token:d99da418-336b-452c-a712-6767184383f1, category:mcd-sync-data-task-category, requestId:14139, error:Error Domain=mqtt Code=3008
2021-03-20 09:02:51.539 14219-15669/? E/msgr.msys: E[S sync]_createResponseError(166)=>Network Response 624691b3-7763-4912-ac36-fcda5324bd31 contains sync error Error Domain=mqtt Code=3008 - Underlying error (null): Error Domain=mqtt Code=3008
2021-03-20 09:02:51.546 14219-15669/? E/msgr.msys: E[S sync]_createResponseError(166)=>Network Response d99da418-336b-452c-a712-6767184383f1 contains sync error Error Domain=mqtt Code=3008 - Underlying error (null): Error Domain=mqtt Code=3008
2021-03-20 09:02:54.296 4289-4348/? E/Watchdog: !@Sync 5646 [2021-03-20 09:02:54.295] FD count : 586
2021-03-20 09:03:00.005 5119-5119/? E/libprocessgroup: set_timerslack_ns write failed: Operation not permitted
2021-03-20 09:03:00.040 5119-5119/? E/libprocessgroup: set_timerslack_ns write failed: Operation not permitted
2021-03-20 09:03:19.903 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:19.905 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:19.927 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:19.930 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:19.943 4289-4504/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:19.946 4289-4504/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:19.949 4289-4504/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:19.955 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:19.958 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:19.972 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:19.969 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:19.974 19644-32531/? E/libc: Access denied finding property "net.dns1"
2021-03-20 09:03:19.974 19644-32531/? E/libc: Access denied finding property "net.dns2"
2021-03-20 09:03:19.975 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:19.979 3802-4025/? E/Netd: getNetworkForDns: getNetId from enterpriseCtrl is netid 0
2021-03-20 09:03:19.988 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:19.990 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.004 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.022 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.026 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:20.036 4289-4560/? E/NetdEventListenerService: handleMessage: { when=-1ms what=10001 obj=com.android.server.connectivity.NetdEventListenerService$DnsResultParams@968a043 target=com.android.server.connectivity.NetdEventListenerService$DnsEventHandler }
2021-03-20 09:03:20.048 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:20.050 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.066 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.069 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:20.590 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:20.605 4289-4504/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:20.608 4289-4504/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.623 4289-4504/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.680 4289-4504/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.683 4289-4504/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:20.691 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:20.704 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.720 4289-7545/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:20.722 4289-4504/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:20.722 4289-7545/? E/WifiService: Permission violation - getConfiguredNetworks not allowed for uid=10190, packageName=com.tencent.mm, reason=java.lang.SecurityException: Location mode is disabled for the device
2021-03-20 09:03:20.736 4289-4504/? E/WifiService: 10190 has no permission about LOCAL_MAC_ADDRESS
2021-03-20 09:03:21.563 14219-15679/? E/msgr.msys: E[N rtchannel]_rt_mqtt_publish_callback(356)=>Failed to publish the request over MQTT. token:fcc5503f-754c-4804-b5bc-1c002add4e7a, category:mcd-sync-data-task-category, requestId:21044, error:Error Domain=mqtt Code=3008
2021-03-20 09:03:21.570 14219-15669/? E/msgr.msys: E[S sync]_createResponseError(166)=>Network Response fcc5503f-754c-4804-b5bc-1c002add4e7a contains sync error Error Domain=mqtt Code=3008 - Underlying error (null): Error Domain=mqtt Code=3008
2021-03-20 09:03:21.570 14219-15679/? E/msgr.msys: E[N rtchannel]_rt_mqtt_publish_callback(356)=>Failed to publish the request over MQTT. token:58cbb60d-c846-4c76-a6e0-9b9c6c1c0a93, category:mcd-sync-data-task-category, requestId:8130, error:Error Domain=mqtt Code=3008
2021-03-20 09:03:21.578 14219-15669/? E/msgr.msys: E[S sync]_createResponseError(166)=>Network Response 58cbb60d-c846-4c76-a6e0-9b9c6c1c0a93 contains sync error Error Domain=mqtt Code=3008 - Underlying error (null): Error Domain=mqtt Code=3008
2021-03-20 09:03:24.309 4289-4348/? E/Watchdog: !@Sync 5647 [2021-03-20 09:03:24.309] FD count : 586
任何帮助或建议都非常感谢..提前谢谢大家!
【问题讨论】:
-
改回名字还能再用吗?当您“更改项目名称”(即更改了哪些目录和文件的名称、更改了哪些文件内容等)时,您是否能够确定实际修改了什么?
-
我会尝试按照您的建议将其改回,然后看看会发生什么。谢谢先生。
-
好的,我已经改回来了,但问题还是一样。我想我会尝试创建另一个项目并将我所有的包移动到它。我看不出我要做什么的逻辑,但无论如何我都会去做。如果我得到它的工作,我会更新我的答案。非常感谢。
-
如果您的构建失败,那么 Logcat 就无关紧要了,因为您的应用程序从未运行过。但看起来您并没有包含整个构建日志。单击“构建:失败”标题,日志应出现在构建步骤列表右侧的窗格中。如果您没有看到该窗格,则可能已将其大小调整为空,因此请尝试从右侧将其拖回。
标签: java python android gradle chaquopy