我在互联网上搜索了答案,但没有找到它们。 所以我签署我的apk把它放在商店,作为更新。当我在我的设备上启动应用程序时,屏幕变黑。有任何想法吗 ?
闪屏:
public class SplashScreen extends Activity implements ReadJSONFeedTaskListener {
@SuppressWarnings("unused")
private int hasAckNoInternet = 0;
@SuppressWarnings("unused")
private int hasAckNoTransferredData = 0;
public static void setAutoOrientationEnabled(ContentResolver resolver, boolean enabled) {
Settings.System.putInt(resolver, Settings.System.ACCELEROMETER_ROTATION, enabled ? 1 : 0);
}
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
try {
setContentView(R.layout.activity_splash_screen);
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
ProgressBar progressbar_ = (ProgressBar) findViewById(R.id.progressbar_);
TextView txtview_ = (TextView) findViewById(R.id.loadingprogress_);
int i_notification_bar=MainShip.getInstance().get_I_from_shared_preferences("notification_bar");
if ( i_notification_bar==-1)
MainShip.getInstance().save_to_shared_preferences_I("notification_bar", 0);
int i_show_images_in_news=MainShip.getInstance().get_I_from_shared_preferences("images_in_news");
if (i_show_images_in_news==-1)
MainShip.getInstance().save_to_shared_preferences_I("images_in_news", 0);
Integer i_default_play_quality=MainShip.getInstance().get_I_from_shared_preferences("default_play_quality");
if ( i_default_play_quality<=0 )
MainShip.getInstance().save_to_shared_preferences_I("default_play_quality",1);
Integer i_show_images_in_movies=MainShip.getInstance().get_I_from_shared_preferences("images_in_movies");
if ( i_show_images_in_movies<=0 )
MainShip.getInstance().save_to_shared_preferences_I("images_in_movies",1);
Integer i_no_wireless_warn=MainShip.getInstance().get_I_from_shared_preferences("no_wireless_warn");
if ( i_no_wireless_warn<=0 )
MainShip.getInstance().save_to_shared_preferences_I("no_wireless_warn",1);
Integer i_permit_messages_from_server=MainShip.getInstance().get_I_from_shared_preferences("permit_messages_from_server");
if ( i_permit_messages_from_server<=0 )
MainShip.getInstance().save_to_shared_preferences_I("permit_messages_from_server",0);
//delete logs
SQLInterface oSQLInterface=new SQLInterface(this.getApplicationContext());
oSQLInterface.delete_errors();
oSQLInterface.close_database();
//Log.e("MainShip","SplashScreen.onCreate -------------- called ----------------");
new ReadJSONFeedTask(this, progressbar_, txtview_, this, this.getFilesDir().toString()).execute("executing readJSONFeedTask");
} catch (Exception e) {
if ( e!=null )
MainShip.getInstance().log_message(Log.getStackTraceString(e), true);
}
}
// This is the callback for when your async task has finished
@Override
public void onTaskFinished() {
completeSplash();
}
private void completeSplash(){
startApp();
finish(); // Don't forget to finish this Splash Activity so the user can't return to it!
}
private void startApp() {
Intent intent = new Intent(SplashScreen.this, MainScreen.class);
startActivity(intent);
}
@Override
public void onBackPressed() {
return;
}
}
答案 0 :(得分:0)
我已经确定了错误,它是文件proguard.cfg。删除后,一切都很好。