Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-16261

CLI: AndroidManifest.xml not updated to reflect map v2 API key (custom build)

    Details

      Description

      Issue description

      After following these instruction to implement Google Maps v2 http://docs.appcelerator.com/titanium/3.0/#!/guide/Google_Maps_v2_for_Android
      the developer

      When trying out to see the map this is seen in the crash report:

      TiApplication: (main) [47657,47657] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.onforce.OnForce/org.appcelerator.titanium.TiActivity}: java.lang.RuntimeException: API key not found.  Check that <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="your API key"/> is in the <application> element of AndroidManifest.xml; Titanium 3.2.0,2014/01/08 17:01,dd79e01
      [ERROR] :  TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.onforce.OnForce/org.appcelerator.titanium.TiActivity}: java.lang.RuntimeException: API key not found.  Check that <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="your API key"/> is in the <application> element of AndroidManifest.xml
      [ERROR] :  TiApplication:   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2194)
      [ERROR] :  TiApplication:   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2229)
      [ERROR] :  TiApplication:   at android.app.ActivityThread.access$600(ActivityThread.java:139)
      [ERROR] :  TiApplication:   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1261)
      [ERROR] :  TiApplication:   at android.os.Handler.dispatchMessage(Handler.java:99)
      [ERROR] :  TiApplication:   at android.os.Looper.loop(Looper.java:154)
      [ERROR] :  TiApplication:   at android.app.ActivityThread.main(ActivityThread.java:4944)
      [ERROR] :  TiApplication:   at java.lang.reflect.Method.invokeNative(Native Method)
      [ERROR] :  TiApplication:   at java.lang.reflect.Method.invoke(Method.java:511)
      [ERROR] :  TiApplication:   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
      [ERROR] :  TiApplication:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
      [ERROR] :  TiApplication:   at dalvik.system.NativeStart.main(Native Method)
      [ERROR] :  TiApplication: Caused by: java.lang.RuntimeException: API key not found.  Check that <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="your API key"/> is in the <application> element of AndroidManifest.xml
      [ERROR] :  TiApplication:   at maps.af.ay.a(Unknown Source)
      [ERROR] :  TiApplication:   at maps.af.ay.a(Unknown Source)
      [ERROR] :  TiApplication:   at maps.af.al.a(Unknown Source)
      [ERROR] :  TiApplication:   at maps.af.be.a(Unknown Source)
      [ERROR] :  TiApplication:   at maps.af.bd.a(Unknown Source)
      [ERROR] :  TiApplication:   at cmj.onTransact(SourceFile:107)
      [ERROR] :  TiApplication:   at android.os.Binder.transact(Binder.java:297)
      [ERROR] :  TiApplication:   at com.google.android.gms.maps.internal.IMapFragmentDelegate$a$a.onCreateView(Unknown Source)
      [ERROR] :  TiApplication:   at com.google.android.gms.maps.SupportMapFragment$a.onCreateView(Unknown Source)
      [ERROR] :  TiApplication:   at com.google.android.gms.dynamic.a$4.b(Unknown Source)
      [ERROR] :  TiApplication:   at com.google.android.gms.dynamic.a.a(Unknown Source)
      [ERROR] :  TiApplication:   at com.google.android.gms.dynamic.a.onCreateView(Unknown Source)
      [ERROR] :  TiApplication:   at com.google.android.gms.maps.SupportMapFragment.onCreateView(Unknown Source)
      [ERROR] :  TiApplication:   at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:871)
      [ERROR] :  TiApplication:   at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1083)
      [ERROR] :  TiApplication:   at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:635)
      [ERROR] :  TiApplication:   at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1431)
      [ERROR] :  TiApplication:   at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:523)
      [ERROR] :  TiApplication:   at org.appcelerator.titanium.TiBaseActivity.onStart(TiBaseActivity.java:1048)
      [ERROR] :  TiApplication:   at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1195)
      [ERROR] :  TiApplication:   at android.app.Activity.performStart(Activity.java:4541)
      [ERROR] :  TiApplication:   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2167)
      

      Note that it complains that it doesn't have this tag:

      <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyBpAGeW8qGPIxohM11UILmOEyRLn70WYVk"/>

      Steps to reproduce

      1) Please find the SDK uploaded here: https://www.dropbox.com/s/g6ont6pqn9586d5/onforce-3.2.0-osx.zip
      2) To generate the build use packaging command (-T dist-playstore):

      • titanium build -T dist-playstore --platform android -L OnForce -f -K ./tools/onforce.keystore -O ./tools/

      3) Watch packaged APK. Browse Androidmanifest.xml contents. API key not listed into generated file.

        Attachments

          Activity

            People

            • Assignee:
              cbarber Chris Barber
              Reporter:
              egomez Eduardo Gomez (Inactive)
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-18246
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code