0

I am creating apk from the my application. Apk works in the first installation on my real device. But when I want to delete and later installation the same apk on my phone I get an error."Failed to install application. "

My Project

classpath 'com.android.tools.build:gradle:3.4.2'

compileSdkVersion 29

buildToolsVersion "29.0.0"

Android Studio =3.4.2

I also tried other tools.and I created and tried another application. But they were also the same error.

3 Answers3

1

Try Build->Build Bundle(s)/APK(s)-> Build Apk(s) or Bundles(s) and then run the app again . Hope this helps

  • Thx so much for ansver.ı tried build apk.later try genered signed apk v1 and v2.But I have same problem. – Enes BAŞKAYA Aug 06 '19 at 07:45
  • At first just try build apk(s), try not to generate signed apk(s). If it didn't work again try File-> Invalidate cache and restart – Aashutosh Poudel Aug 06 '19 at 07:49
  • ı tried File->invalid cache .later tried build apk and ı have same problem.First instaling no problem.it is working.but when delete apk later install .it is not working. – Enes BAŞKAYA Aug 06 '19 at 08:02
  • For some devices you can try these: 1)Go to the developer option and in that disable MIUI optimization.You will be asked to reboot your phone. Reboot it and then run the app. 2) Also try to disable Instant Run from Android Studio: File > Settings > Build,Execution,Deployment > Instant Run > Un-check (Enable Instant Run to hot swap code) 3)Go to Build --> Clean Project --> Run – Aashutosh Poudel Aug 06 '19 at 09:26
0

Delete all files in the directory YourProjectName\build\android-profile.

amd
  • 1
  • 1
  • Thx so much for asnver.but ı dint find your tell folder.Now I am not getting errors when another computer also builds apk. But when I create apk on my own computer I get the error. – Enes BAŞKAYA Aug 06 '19 at 12:09
0

I finded this solution.Now working .Thx so much @Konstantin Raspopov

Going to Google Play -> Play Protect and turning off Scanning device for security threats helped me.

source:https://stackoverflow.com/a/51335340/11840484