the created "app-release.apk" ... does not work on my application, but "app-debug.apk" works fine,
Update:
after switching to the previous version of my application:
in my MainActivity I have the following lines:
public class MainActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final String PREFS_NAME = "MyPrefsFile"; SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0); if (settings.getBoolean("my_first_time", true)) { //the app is being launched for first time, do something TeamModel pm; DBHelper db; String teamNames1= "Los Angeles Lakers"; String teamOpponent1= "Golden State Warriors"; String teamDate1= "2015-03-16 22:30"; String teamNames2= "Atlanta Hawks"; String teamOpponent2= "Sacramento Kings"; String teamDate2= "2015-03-16 20:00"; . . String teamNames348= "Charlotte Hornets"; String teamOpponent348= "Utah Jazz"; String teamDate348= "2015-03-16 21:00"; db = new DBHelper(getApplicationContext()); db.getWritableDatabase(); pm = new TeamModel(); pm.teamname= teamNames1; pm.teamopponent=teamOpponent1; pm.teamdate= teamDate1; db.addTeam(pm); pm.teamname= teamNames2; pm.teamopponent=teamOpponent2; pm.teamdate= teamDate2; db.addTeam(pm); . . pm.teamname= teamNames348; pm.teamopponent=teamOpponent328; pm.teamdate= teamDate348; db.addTeam(pm); Log.d("Comments", "First time"); settings.edit().putBoolean("my_first_time", false).commit();
After deleting lines 1 to 107 (teamNames, teamOpponent, teamdate) from this operation, the application worked fine on my device
to explain more, my MainActivity become:
public class MainActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final String PREFS_NAME = "MyPrefsFile"; SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0); if (settings.getBoolean("my_first_time", true)) { //the app is being launched for first time, do something TeamModel pm; DBHelper db; String teamNames107= "Los Angeles Lakers"; !!! String teamOpponent107= "Golden State Warriors"; !!! String teamDate107= "2015-03-16 22:30"; !!! String teamNames108= "Atlanta Hawks"; String teamOpponent108= "Sacramento Kings"; String teamDate108= "2015-03-16 20:00"; . . String teamNames348= "Charlotte Hornets"; String teamOpponent348= "Utah Jazz"; String teamDate348= "2015-03-16 21:00"; db = new DBHelper(getApplicationContext()); db.getWritableDatabase(); pm = new TeamModel(); pm.teamname= teamNames107; pm.teamopponent=teamOpponent107; pm.teamdate= teamDate107; db.addTeam(pm); pm.teamname= teamNames108; pm.teamopponent=teamOpponent108; pm.teamdate= teamDate108; db.addTeam(pm); . . pm.teamname= teamNames348; pm.teamopponent=teamOpponent328; pm.teamdate= teamDate348; db.addTeam(pm); Log.d("Comments", "First time"); settings.edit().putBoolean("my_first_time", false).commit();
what's wrong? how can i fix this without deleting the lines?
My error log when I try to install app-release.apk on my device via terminal:
Failure [INSTALL_FAILED_DEXOPT]
When I try to install on devation to 'build variant: release', I got the following:

Installation error, because the device may have outdated jix banks that do not match the current version (dexopt error). To continue, you must uninstall the existing application. WARNING: Deletion will delete the application data! Do you want to delete an existing application?
in OK or cancel I received:
Failure [INSTALL_FAILED_DEXOPT]
NB: everything is fine on the emulator