-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Found item String/google_app_id more than one time #468
Comments
Same issue. Here is the <?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="app_name">Jasper Government</string>
<string name="launcher_name">@string/app_name</string>
<string name="activity_name">@string/launcher_name</string>
<string name="google_app_id">1:739999999999:android:b738888888888888</string>
<string name="google_api_key">AIzaSySySySySySySySySySySySySySySySySySy</string>
<string name="google_app_id">@string/google_app_id</string>
<string name="google_api_key">@string/google_api_key</string>
</resources> |
I am facing also this problem.Managed to get over the problem. When I run "ionic cordova [build || run] android, the "ionic cordova prepare android" task is writing in the strings.xml file the:
Because of that the build task fails. I managed to do builds by running "ionic cordova prepare android" task, then I manually delete the two lines from strings.xml. After that I build the apk from Android Studio. And repeat. Develop, prepare, delete, build, install, repeat, :). Hope this helps somebody. ionic ionfo
FILESpackage.json
config.xml < ?xml version='1.0' encoding='utf-8'?> |
@robertarnesson any ideia how fix it ? any workaround? |
@robertarnesson in replaced
for
fixed it! |
To fix it: Edit platforms/android/android.json Search for 'google_app_id' and you'll find 2 of them. The first with ' translatable="false"' and then 2x more "/resources" objects, one with 'google_app_id' and one with 'google_app_key'. You DON'T need the 2 other ones so leave ONLY the first one (with ' translatable="false"'). Now it'll still not going to work because you need to edit also platforms/android/res/value/strings.xml and do the same: remove the 2 extra google_app_id and google_app_key settings after the first one with ' translatable="false"' in it. Now you can compile without any errors. |
I am facing an issue while building for android. As below :
google_app_id
andgoogle_api_key
added twice in strings.xml.So for now I can manage by removing entry but I have to do it for each time.
Current version :
Your system information:
Cordova CLI: 7.1.0
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 1.3.2
Ionic CLI Version: 1.7.16
Ionic App Lib Version: 0.7.3
ios-deploy version: 1.9.2
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v6.11.4
Xcode version: Xcode 9.0.1 Build version 9A1004
The text was updated successfully, but these errors were encountered: