FIRST-Tech-Challenge / SkyStone

FTC SDK
https://www.firstinspires.org/robotics/ftc/what-is-first-tech-challenge
275 stars 1.04k forks source link

5.5 RobotController fails :lint on a default gradle build #262

Open alan412 opened 4 years ago

alan412 commented 4 years ago

If you do a full gradle build (say from the command line or in an automated system), the menus fail lint which stops the build

2 ways to fix this: 1 - fix the errors in the menu or 2 - put

   lintOptions{
      abortOnError false
   }

into build.gradle under FtcRobotController

As a related note, I was surprised that the build.gradle in FtcRobotController didn't use build.common.gradle

Windwoes commented 4 years ago

Do you happen to know where Lint starts crying?

alan412 commented 4 years ago

../../src/main/res/menu/ftc_robot_controller.xml:39: Should use app:showAsAction with the appcompat library with xmlns:app=" http://schemas.android.com/apk/res-auto"

36 <item 37 android:id="@+id/action_settings" 38 android:orderInCategory="100" 39 android:showAsAction="never" 40 android:title="@string/settings_menu_item"/> 41 <item 42 android:id="@+id/action_restart_robot"

../../src/main/res/menu/ftc_robot_controller.xml:44: Should use app:showAsAction with the appcompat library with xmlns:app=" http://schemas.android.com/apk/res-auto"

41 <item 42 android:id="@+id/action_restart_robot" 43 android:orderInCategory="200" 44 android:showAsAction="never" 45 android:title="@string/restart_robot_menu_item"/> 46 47 <item

../../src/main/res/menu/ftc_robot_controller.xml:50: Should use app:showAsAction with the appcompat library with xmlns:app=" http://schemas.android.com/apk/res-auto"

47 <item 48 android:id="@+id/action_configure_robot" 49 android:orderInCategory="300" 50 android:showAsAction="never" 51 android:title="@string/configure_robot_menu_item"/> 52 53 <item

../../src/main/res/menu/ftc_robot_controller.xml:56: Should use app:showAsAction with the appcompat library with xmlns:app=" http://schemas.android.com/apk/res-auto"

53 <item 54 android:id="@+id/action_program_and_manage" 55 android:orderInCategory="550" 56 android:showAsAction="never" 57 android:title="@string/program_and_manage_menu_item"/> 58 59 <item

../../src/main/res/menu/ftc_robot_controller.xml:62: Should use app:showAsAction with the appcompat library with xmlns:app=" http://schemas.android.com/apk/res-auto"

59 <item 60 android:id="@+id/action_inspection_mode" 61 android:orderInCategory="600" 62 android:showAsAction="never" 63 android:title="@string/inspection_mode_menu_item"/> 64 65 <item

On Wed, Aug 26, 2020 at 2:56 PM FROGbots-4634 notifications@github.com wrote:

Do you happen to know where Lint starts crying?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/FIRST-Tech-Challenge/SkyStone/issues/262#issuecomment-681062318, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAF3Y7Y6NU2Y3G7B37GE7ATSCVLGLANCNFSM4QMEP4GQ .

thoughtless42 commented 4 years ago

looks like it was introduced with/content/SkyStone/TeamCode/build.release.gradle implementation 'androidx.appcompat:appcompat:1.2.0' here is a diff that fixes this error %%writefile /content/SkyStone/FtcRobotController/src/main/res/menu/ftc_robot_controller.xml.patch --- ftc_robot_controller.xml 2020-09-04 23:28:02.424591542 +0000 +++ ftc_robot_controller.xml 2020-09-04 23:18:16.785614609 +0000 @@ -31,35 +31,35 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->

-

+

  • <item

  • <item android:id="@+id/action_settings" android:orderInCategory="100"

  • android:showAsAction="never"

  • app:showAsAction="never" android:title="@string/settings_menu_item"/>

  • <item

  • <item android:id="@+id/action_restart_robot" android:orderInCategory="200"

  • android:showAsAction="never"

  • app:showAsAction="never" android:title="@string/restart_robot_menu_item"/>

  • <item

  • <item android:id="@+id/action_configure_robot" android:orderInCategory="300"

  • android:showAsAction="never"

  • app:showAsAction="never" android:title="@string/configure_robot_menu_item"/>

  • <item

  • <item android:id="@+id/action_program_and_manage" android:orderInCategory="550"

  • android:showAsAction="never"

  • app:showAsAction="never" android:title="@string/program_and_manage_menu_item"/>

  • <item

  • <item android:id="@+id/action_inspection_mode" android:orderInCategory="600"

  • android:showAsAction="never"

  • app:showAsAction="never" android:title="@string/inspection_mode_menu_item"/>

<item