Reputation: 71
I use Visual Studio 2015 to create Cordova project, but when I debug the solution, the VS told me:
Error DEP10402: Could not locate a deployable apk. You may need to build your project.
and I couldn't get any project apk.
Upvotes: 7
Views: 7586
Reputation: 345
I had the same issue with Visual Studio 2017 and Ionic 3. The cordova-cli 8 (if you use a global cordova-cli) copies the apk into another folder and hence VS doesn't find it. I added a copyapk script which is run after the build is completed.
https://github.com/hamburml/ionic3-vs2017-blank-template
Upvotes: 2
Reputation: 36
Although it's an old question, in my case the problem was caused because of configuration name.
In my project I have several configuration names for different environments (local, dev, pro), when using one of this names, the problem occurs.
If configuration name is set to default "Debug" the error disappears, but then I lose easy environment configuration.
Upvotes: 0
Reputation: 286
This Error may occurred because of the incompatibility of cordova version, check your installed cordova version bye entrig following
cordova -v
and make sure same version added to visual studio project, in config.xml -> platform -> cordova cli
Upvotes: 2
Reputation: 3569
I had the issue and I finally manage to run my application after restarting my machine and avoiding to open any application. It looks like the problem does not arise when there's a lot of available memory...
Upvotes: -1
Reputation: 131
it happened before with some versions of cordova-cli
try using 5.4.1 or 5.3.0
i experience this problem in 5.4.0 but it dose not appeared in 5.4.1
it seems that some cordova-cli versions did not use --release as it should be
Upvotes: 1
Reputation: 342
How about try to clear solution from Project root and rebuild again.
Upvotes: 0