0
votes

I have followed the steps in mobile backend starter in google app engine, and use the sample "guestbook" provided, but after building all the projects, it shows several errors which seems to me the source code errors as follows:

1.Description Resource Path Location Type case expressions must be constant expressions GuestbookActivity.java /CloudBackendAndroidClient/src/com/google/cloud/backend/sample/guestbook line 146 Java Problem

2.Description Resource Path Location Type case expressions must be constant expressions IntroFirstFragment.java /CloudBackendAndroidClient/src/com/google/cloud/backend/sample/guestbook line 50 Java Problem

3.Description Resource Path Location Type case expressions must be constant expressions IntroSecondFragment.java /CloudBackendAndroidClient/src/com/google/cloud/backend/sample/guestbook line 53 Java Problem

4.Description Resource Path Location Type case expressions must be constant expressions IntroSecondFragment.java /CloudBackendAndroidClient/src/com/google/cloud/backend/sample/guestbook line 56 Java Problem

5.Description Resource Path Location Type case expressions must be constant expressions IntroThirdFragment.java /CloudBackendAndroidClient/src/com/google/cloud/backend/sample/guestbook line 60 Java Problem

6.Description Resource Path Location Type case expressions must be constant expressions IntroThirdFragment.java /CloudBackendAndroidClient/src/com/google/cloud/backend/sample/guestbook line 63 Java Problem

7.Description Resource Path Location Type case expressions must be constant expressions IntroThirdFragment.java /CloudBackendAndroidClient/src/com/google/cloud/backend/sample/guestbook line 66 Java Problem

I definitely can't figure out what happends here, I don't know if there is any problem in its source code, so I need experts to help me to this problem. Thanks so much!


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Ok, the problem is fixed as suggested. But a final problem is the error:

Description Resource Path Location Type error: No resource identifier found for attribute 'parentActivityName' in package 'android' AndroidManifest.xml /CloudBackendAndroidClient line 22 Android AAPT Problem

If I need to add something in androidManifest.xml?

1

1 Answers

0
votes

This looks like it is related to this post: switch case statement error: case expressions must be constant expression

It seems as of ADT 14 constants in the resource R class are no longer declared as final, so you will need to convert the switches into if-else statements.