【问题标题】:Period in package name is replaced by comma包名中的句点替换为逗号
【发布时间】:2016-09-29 21:10:28
【问题描述】:

1) 每当我运行我的代码时,“。”标签“action”中的appwidget.action之间变成了“,”。是什么导致了问题?谁能帮帮我?

在运行代码之前,

<receiver android:name="com.example.newstart.practice.Widget" >
     <intent-filter>
        <action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
     </intent-filter>
     <meta-data
         android:name="android.appwidget.provider"
         android:resource="@xml/widget_stuff" />
</receiver>

运行代码后,

<receiver android:name="com.example.newstart.practice.Widget" >
     <intent-filter>
        <action android:name="android.appwidget,action.APPWIDGET_UPDATE"/>
     </intent-filter>
     <meta-data
         android:name="android.appwidget.provider"
         android:resource="@xml/widget_stuff" />
</receiver>

它会自动变为“,”并显示错误:

 Error:(228) Tag <action> attribute name has invalid character ','

2) 在这个错误下也会显示这个错误-

错误:任务 ':app:processDebugResources' 执行失败。 com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\ASUS\AppData\Local\Android\sdk\build-tools\23.0.3\aapt.exe'' 以非零退出值 1 结束

【问题讨论】:

  • 你用什么运行代码?

标签: android compiler-errors android-manifest action receiver


【解决方案1】:

确保将原始AndroidManifest.xml 中的, 更改为.,而不是生成/中间的.。

【讨论】:

  • 我这样做了,但它仍然自动更改为“,”!
猜你喜欢
  • 2018-05-31
  • 1970-01-01
  • 2022-07-21
  • 1970-01-01
  • 2023-01-05
  • 1970-01-01
  • 1970-01-01
  • 2014-01-28
  • 1970-01-01
相关资源
最近更新 更多