OSDN Git Service

Add error message to log if layoutlib init fails
authorTor Norbye <tnorbye@google.com>
Wed, 26 Jan 2011 00:03:11 +0000 (16:03 -0800)
committerTor Norbye <tnorbye@google.com>
Wed, 26 Jan 2011 00:16:26 +0000 (16:16 -0800)
Change-Id: I5f61733c02002eca9400d5abbfc33393cabd1667

eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/AndroidTargetData.java

index 31475ee..ae81ed6 100644 (file)
@@ -252,7 +252,7 @@ public class AndroidTargetData {
      */
     public synchronized LayoutLibrary getLayoutLibrary() {
         if (mLayoutBridgeInit == false && mLayoutLibrary.getStatus() == LoadStatus.LOADED) {
-            mLayoutLibrary.init(
+            boolean ok = mLayoutLibrary.init(
                     mTarget.getProperties(),
                     new File(mTarget.getPath(IAndroidTarget.FONTS)),
                     getEnumValueMap(),
@@ -274,6 +274,10 @@ public class AndroidTargetData {
                             AdtPlugin.log(IStatus.WARNING, message);
                         }
                     });
+            if (!ok) {
+                AdtPlugin.log(IStatus.ERROR,
+                        "LayoutLibrary initialization failed");
+            }
             mLayoutBridgeInit = true;
         }