编译时出现stripped of unavailable superclass

简介: 编译时出现stripped of unavailable superclass

frameworks/base/core/java/android/app/AudioFocuseManager.java:6:  

error 111: Public class android.app.AudioFocuseManager stripped of unavailable superclass android.app.IAudioFocuseManager.Stub


    如此类错误,请检查是否使用了@hide导致, 以下两段aidl中的代码

package android.app;
interface IAudioFocuseManager {
    void shouldAudioFocused(String pkg);
}
-------------------------------------------------
package android.app;
/** {@hide} */
interface IAudioFocuseManager {
    void shouldAudioFocused(String pkg);
}

/** {@hide} */ 这个注释本以为是没用的, 后面才发现对应java的代码应该为:

package android.app;
import android.os.RemoteException;
import android.app.IAudioFocuseManager.Stub;
public class AudioFocuseManager extends IAudioFocuseManager.Stub{
     @Override
     public void shouldAudioFocused(String pkg) throws RemoteException{
     }
}
-----------------------------------------------
package android.app;
import android.os.RemoteException;
import android.app.IAudioFocuseManager.Stub;
/**
* @hide
*/
public class AudioFocuseManager extends IAudioFocuseManager.Stub{
     @Override
     public void shouldAudioFocused(String pkg) throws RemoteException{
     }
}
相关文章
error ‘.native‘ modifier on ‘v-on‘ directive is deprecated
error ‘.native‘ modifier on ‘v-on‘ directive is deprecated
|
Java Maven Android开发
成功解决FATAL ERROR in native method: JDWP on getting class status, jvmtiError=JVMTI_ERROR_WRONG_PHASE
成功解决FATAL ERROR in native method: JDWP on getting class status, jvmtiError=JVMTI_ERROR_WRONG_PHASE
|
小程序 开发者
小程序报错-ReferenceError: regeneratorRuntime is not defined
小程序报错-ReferenceError: regeneratorRuntime is not defined
120 0
|
人工智能 自然语言处理 前端开发
小程序引入组件库报错VM128:1 Unhandled promise rejection TypeError: WebAssembly.instantiate(): Argument 0 must
小程序引入组件库报错VM128:1 Unhandled promise rejection TypeError: WebAssembly.instantiate(): Argument 0 must
64 0
|
JavaScript CDN
Uncaught TypeError: Cannot redefine property: $router
Uncaught TypeError: Cannot redefine property: $router
225 0
|
Java 数据库连接 数据库
【Java异常】Failed to determine a suitable driver class
【Java异常】Failed to determine a suitable driver class
487 0
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_ZMCertification", referenced from:解决方法
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_ZMCertification", referenced from:解决方法
208 0
解决performSelector may cause a leak because its selector is unknown警告
采用以下方法时会提示【performSelector may cause a leak because its selector is unknown】警告
219 0
解决g++编译C++报错unresolved external... (undefined reference ...)
解决g++编译C++报错unresolved external... (undefined reference ...)
335 0
解决g++编译C++报错unresolved external... (undefined reference ...)
SipStack.i:321: Error: Unknown SWIG preprocessor directive:
SipStack.i:321: Error: Unknown SWIG preprocessor directive:
83 0