gpt4 book ai didi

android - 无法从 package.access$super 中找到类 'android.os.PersistableBundle' 引用

转载 作者:行者123 更新时间:2023-12-02 09:50:05 27 4
gpt4 key购买 nike

我无法找到针对这个意外错误的解决方案,该错误从过去 3 小时开始出现在我的应用程序中。到目前为止,一切都运行得很好,一切都完全相同。

所有内容都已附在这个问题上。我无法从其他帖子中找到解决方案,我尝试了他们的解决方案,但它们对我不起作用,例如将构建版本从 23.3.0 更改为 23.0.0compileSDKVersion 也与构建版本相同,我不知道为什么会收到此错误。

我的 android studio 版本是 2.1.2,我在 API 19 上运行此应用程序。

这是我的日志猫:

E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method  com.mypackage.test.HowToUse.access$super
06-26 04:04:14.995 4130-4130/ com.mypackage.test E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.mypackage.test.HowToUse.access$super
06-26 04:04:14.995 4130-4130/ com.mypackage.test E/dalvikvm: Could not find class 'android.media.session.MediaController', referenced from method com.mypackage.test.HowToUse.access$super
06-26 04:04:14.995 4130-4130/ com.mypackage.test E/dalvikvm: Could not find class 'android.widget.Toolbar', referenced from method com.mypackage.test.HowToUse.access$super
06-26 04:04:14.997 4130-4130/ com.mypackage.test E/dalvikvm: Could not find class 'android.app.ActivityManager$TaskDescription', referenced from method com.mypackage.test.HowToUse.access$super
06-26 04:04:14.999 4130-4130/ com.mypackage.test E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.mypackage.test.HowToUse.access$super
06-26 04:04:15.000 4130-4130/ com.mypackage.test E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.mypackage.test.HowToUse.access$super
06-26 04:04:15.002 4130-4130/ com.mypackage.test E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method com.mypackage.test.HowToUse.access$super
06-26 04:04:15.006 4130-4130/ com.mypackage.test E/dalvikvm: Could not find class 'android.app.assist.AssistContent', referenced from method com.mypackage.test.HowToUse.access$super
06-26 04:04:15.008 4130-4130/ com.mypackage.test E/dalvikvm: Could not find class 'android.view.SearchEvent', referenced from method com.mypackage.test.HowToUse.access$super
06-26 04:04:15.010 4130-4130/ com.mypackage.test E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method com.mypackage.test.HowToUse.access$super
06-26 04:04:15.212 4130-4506/ com.mypackage.test E/WifiManager: mWifiServiceMessenger == null

梯度:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
applicationId "com.mypackage.test"
minSdkVersion 10
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.3.0'
compile files('libs/StartAppInApp-3.3.2.jar')
}

java代码:

Button btngrp,btnppl,btnnext;
LinearLayout hidden_share;
private StartAppAd startAppAd = new StartAppAd(this);
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_share_screen);

grp = (TextView)findViewById(R.id.tvgrp);
ppl = (TextView)findViewById(R.id.tvppl);

btngrp = (Button)findViewById(R.id.btngrpshare);
btnppl = (Button)findViewById(R.id.btnindshare);
btnnext = (Button)findViewById(R.id.btnnext);

hidden_share = (LinearLayout)findViewById(R.id.hiddenshare);
hidden_share.setVisibility(View.GONE);

btngrp.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startAppAd.showAd();
startAppAd.loadAd();
share();
if(isNetworkAvailable()) {
int nos= Integer.parseInt(grp.getText().toString());
nos--;
if(nos==-1){
hidden_share.setVisibility(View.VISIBLE);
}else {
grp.setText("" + nos);
}
}else{
Toast.makeText(getApplicationContext(),"No internet found, Please make sure you are connected to internet",Toast.LENGTH_SHORT).show();
}

}
});

btnppl.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startAppAd.showAd();
startAppAd.loadAd();
share();
if(isNetworkAvailable()) {
int nos= Integer.parseInt(ppl.getText().toString());
nos--;
if(nos==-1){
hidden_share.setVisibility(View.VISIBLE);
}else {
ppl.setText("" + nos);
}
}else{
Toast.makeText(getApplicationContext(),"No internet found, Please make sure you are connected to internet",Toast.LENGTH_SHORT).show();
}

}
});

btnnext.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startAppAd.showAd();
startAppAd.loadAd();
if(isNetworkAvailable()) {
startActivity(new Intent(ShareScreen.this,Capcha.class));
}else{
Toast.makeText(getApplicationContext(),"No internet found, Please make sure you are connected to internet",Toast.LENGTH_SHORT).show();
}

}
});
}

最佳答案

好吧,对我有帮助的是:我将我的 android 插件版本从 2.1.2 降级到 1.5.0,清理了构建并测试了我的应用,并且不再有错误,我不知道为什么该插件会产生问题。

关于android - 无法从 package.access$super 中找到类 'android.os.PersistableBundle' 引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38033616/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com