Reputation: 1285
I am trying to run my app on a real Android device using Android Studio v3.5. It throws the following error while installing the app.
> Installation did not succeed.
> The application could not be installed.
> Installation failed due to: 'null'
Upvotes: 35
Views: 149891
Reputation: 1552
On my MacOS Android Studio Koala | 2024.1.1 I had this same issue with just one API 35 Emulator out of 3. This Emulator had Google Play enabled.
This issue was fixed by going:
Settings -> Build, Execution, Deployment -> Debugger
In here scroll down to: Android Debug Bridge (adb) For the option "ADB server USB backend" switch it from "default" to "native".
Upvotes: 0
Reputation: 15
My phone is Samsung Samsung SM-J415F. I was also getting an "installation failed Suggested actionr" message. I installed the smart switch program from the Play Store on my phone and it was solved.
https://play.google.com/store/apps/details?id=com.sec.android.easyMover&hl=en_AU&gl=US
Upvotes: 0
Reputation: 41
For me the fix was to make sure that the apk file didn't contain any spaces. Mine was Name v.1.0.0 and the space was causing it to fail. After renaming it to Name_v1.0.0 it worked.
Upvotes: 1
Reputation: 1
In my case, I had changed the name of the build that is generated before installing the apk into a name with underscores and spaces, by the setProperty tag in defaultConfig of apks in gradle as follow:
defaultConfig {
...
minSdk = 23
targetSdk = 33
// setProperty("archivesBaseName", "Music Player-vn_$versionName-vc_$versionCode")
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled = true
...
}
because of the spaces and this complex name, the adb (which is responsible for installing the apk in your device) was unable to locate the apk file, and thus the installing didn't succeed.
changing the name into something simple fixed the problem.
so if you have changed the name of autogenerated build apk, change it into something simple or simple comment the setProperty tag from gradle and it will fix the issue.
Upvotes: 0
Reputation: 1
It's also worth checking if your build.gradle
has the line archivesBaseName="text"
where "text"
contains spaces or characters from different languages. In my case this was the problem
Upvotes: 0
Reputation: 21
I was faced this same error while running application. I am just rebuild the program and run again the application..
Upvotes: 1
Reputation: 4069
Accept agreement of terms and conditions by opening Google Maps and Google Chrome on a newly created emulator, your application might be using Google play or location services.
Upvotes: 0
Reputation: 494
I had the Same issue on a MAC, this is how I solve it, note: I was tried the method that mention @Manoj Kumar,
Un check this field in Preferences/Build,Execution,Deployment/Debugger
Upvotes: 47
Reputation: 2056
go to the path of your debug apk, and rename of your apk like :
myApp.apk to myApp1.apk(just rename it) and try to run it again.
its works for me every time :)
Upvotes: 0
Reputation: 516
Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present.
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Upvotes: 28
Reputation: 9092
Tip: run from terminal adb install path/to/app.apk
Why? Cause it will give more information about the error - actually pointing to the place in manifest with the error. For example - in my case it was: 'Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]'
Upvotes: 4
Reputation: 121
For me, restarting the Android Studio solved the issue.
File> Invalidate Cache / Restart
Upvotes: 12
Reputation: 1689
Create a signed apk and drag that apk to the emulated device, that worked for me
Upvotes: 0
Reputation: 133
As I am currently using IntelliJ IDEA 2021, In order to work for me, I had to disconnect android device(Emulator) to Computer by USB and Free up some space on phone storage Lastly It was to refresh my device by restarting it(phone)
Again, I had to go to:
Settings, Debugger, And Check Hide debug Window on process termination
I hope this helps, if U are using IntelliJ IDEA, for instance.
Upvotes: 0
Reputation: 489
It may be because of your phone's memory is full. you can delete some data from your phone and then try. for me it worked.
Upvotes: 10
Reputation: 375
Just check in the AndroidManifest.xml file to make sure you are using permission and libraries that you need for your app. In some cases you may have wearable libraries and permissions in your AndroidManifest.xml file and yet you do not need them. This happened to me when I was adding more activities and Android Studio was creating them as Wearable Activities
Upvotes: 0
Reputation: 1062
Just use in this link. Disable Preference -> Build,Execution,Deployment -> Debugger -> Use libusb backend
Uncheck Use libusb backend
that's all. Enjoy your coding...
Upvotes: 1
Reputation: 1
I was trying everything but nothing seemed to work. But then I suddenly noticed that my phone blocked installation, so I unchecked "reject this to install" and at the another try the security checkbox popup, asking for letting the installation. After allowing everything worked. Conclusion: I just were probably too angry that i didn't noticed this popup earlier.
Upvotes: 0
Reputation: 124
Add this line to your '/gradle.properties':
# gradle.properties
android.injected.testOnly=false
Check https://gist.github.com/xujiaao/5fd127a72979cdc3c70dcc1324786f87 ,it work for me.
Upvotes: 1
Reputation: 35
Upvotes: 4
Reputation: 2425
In my case I was using third party library, I have removed that library from gradle and reinstall the app. Successful
Upvotes: 1
Reputation: 1285
Restarting the device after enabling developer mode and allowing usb debugging did the trick for me.
Upvotes: 7
Reputation: 1253
When you connect the mobile, it starts in the charging mode. Simply change the mode to Transfer Mode (Transfer Media or photos mode).
Now install the app again and it will work.
Upvotes: 6
Reputation: 362
1.Open run/debug configuration dialog:- Run> edit configurations.
-r -t
.Note: This flags means adb install -r -t
apk path
I hope this will help.
Upvotes: 22