2016-09-20 66 views
0

,我發現了以下錯誤:錯誤110同時運行make

frameworks/base/core/java/android/os/mypackage/MyServiceListenerClass.java:283: error 110: Parameter of unavailable type android.os.storage.VolumeInfo in android.os.mypackage.MyServiceListenerClass.myMethod()

我創建了一個新包了一些類和這些類使用VolumeInfostorage包。

我找不到有關此錯誤的任何文檔。我做錯了什麼?

UPDATE:

  • 發現,Error 110 = UNAVAILABLE_SYMBOL

  • 發現在doclava/Stubs.java本節:

    for (ParameterInfo p : m.parameters()) { 
        TypeInfo t = p.type(); 
        if (!t.isPrimitive()) { 
         hiddenClass = findHiddenClasses(t); 
         if (null != hiddenClass) { 
         if (hiddenClass.qualifiedName() == t.asClassInfo().qualifiedName()) { 
          // Parameter type is hidden 
          Errors.error(Errors.UNAVAILABLE_SYMBOL, m.position(), 
           "Parameter of unavailable type " + t.fullName() + " in " + cl.qualifiedName() 
           + "." + m.name() + "()"); 
         } else { 
          // Parameter type contains a generic parameter 
          Errors.error(Errors.HIDDEN_TYPE_PARAMETER, m.position(), 
           "Parameter uses type parameter of unavailable type " + t.fullName() + " in " 
           + cl.qualifiedName() + "." + m.name() + "()"); 
         } 
         } 
        } 
    } 
    

回答

1

因此,對於這個錯誤的原因是在VolumInfo的文檔部分的底部的@hide屬性:

/** 
* Information about a storage volume that may be mounted. A volume may be a 
* partition on a physical {@link DiskInfo}, an emulated volume above some other 
* storage medium, or a standalone container like an ASEC or OBB. 
* <p> 
* Volumes may be mounted with various flags: 
* <ul> 
* <li>{@link #MOUNT_FLAG_PRIMARY} means the volume provides primary external 
* storage, historically found at {@code /sdcard}. 
* <li>{@link #MOUNT_FLAG_VISIBLE} means the volume is visible to third-party 
* apps for direct filesystem access. The system should send out relevant 
* storage broadcasts and index any media on visible volumes. Visible volumes 
* are considered a more stable part of the device, which is why we take the 
* time to index them. In particular, transient volumes like USB OTG devices 
* <em>should not</em> be marked as visible; their contents should be surfaced 
* to apps through the Storage Access Framework. 
* </ul> 
* 
* @hide 
*/ 

刪除它可以解決問題。