3

I have recently starting to have a problem to run my project from android studio , the APK uploaded to my device from the android studio is not the updated one .

i have checked in the output library and it does create new APK but upload the old one .

after many things i have try'd the only thing works is to do Gradle sync , but every time i want to run my project i need to do this again and again...this thing is driving me crazy !

this is my gradle if relevant :

 dependencies {
     classpath 'com.android.tools.build:gradle:1.+'
 }

this is my run config :

enter image description here

Jesus Dimrix
  • 4,378
  • 4
  • 28
  • 62

2 Answers2

1

the reason is the method getDate in the build.gradle file :

versionName "2.3_" + getDate()

once getDate() was removed problem solved .

Jesus Dimrix
  • 4,378
  • 4
  • 28
  • 62
0

click on the run configuration - edit run configurations select your desired configuration, and click on it then scroll to the bottom to check there is "gradle aware make" before launch task open. if there isnt one, click the + button to add it

Lena Bru
  • 13,521
  • 11
  • 61
  • 126
  • thanks , as you can see gradle aware make is exist in my run configurations – Jesus Dimrix Apr 12 '15 at 09:41
  • hezi, did you install android unit test thing that comes with android studio ? it is a plugin, if you did , you need to remove it, it may be causing this bug – Lena Bru Apr 12 '15 at 11:03