编译时出现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{
     }
}
相关文章
|
9月前
|
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
|
6月前
|
小程序 开发者
小程序报错-ReferenceError: regeneratorRuntime is not defined
小程序报错-ReferenceError: regeneratorRuntime is not defined
38 0
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_ZMCertification", referenced from:解决方法
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_ZMCertification", referenced from:解决方法
169 0
|
内存技术
|
JavaScript
【异常】$ is not defined (已解决)
$ is not defined (已解决),F12调试页面Console错误提示
140 0
|
Oracle Java 关系型数据库
成功编译无错MAC OpenJDK8:Terminating app due to uncaught exception ‘NSInternalInconsistencyException‘
成功编译无错MAC OpenJDK8:Terminating app due to uncaught exception ‘NSInternalInconsistencyException‘
114 0
Gradle sync failed: Unsupported method: NativeArtifact.getSourceFolders().
Gradle sync failed: Unsupported method: NativeArtifact.getSourceFolders().
73 0
|
iOS开发
Xcode报错Expected selector for Objective-C and Expected method body
Xcode报错Expected selector for Objective-C and Expected method body
189 0
Xcode报错Expected selector for Objective-C and Expected method body
解决g++编译C++报错unresolved external... (undefined reference ...)
解决g++编译C++报错unresolved external... (undefined reference ...)
258 0
解决g++编译C++报错unresolved external... (undefined reference ...)
|
Java 编译器
JVM系列之:JIT中的Virtual Call接口
JVM系列之:JIT中的Virtual Call接口
JVM系列之:JIT中的Virtual Call接口