could not find apk in android - android

I am using spring and maven plugins in eclipse but when i want to run this project it returns Could not find ShopZilla.apk? How this will resolved, Please suggest me.

Make sure after updating your android sdk sdk build tools are updated properly. You can check it by Open sdk manager -"Android Sdk Build Tools" status must be installed. if the status is not installed then install Android Sdk Build Tools for the same.

If you have got all required plugins installed (ADT, M2E and M2E Android), the apk should be automatically generated by IDE.
Sometimes the apk file is not generated simply because there are some android build error in your project, unfortunately, these are not compile error so they are not shown in Eclipse problems view. For example, if you attach a icon.jpg file in your res/drawable folder and change the extension to png, you get no compile error in problems view, but if you then manually delete the apk file in your project output folder, the apk file will not be generated again and in this situation Eclipse only gives very generic message "could not find *.apk file" in console view, when you trying to run it on emulator.
Now the only question is how can we tell if there are android build error. right click your project, choose Android Tools -> Fix Project Properties. in my jpg/png example, Eclipse will show "libpng error: Not a PNG file, ERROR: Failure processing PNG image C:\android-sandbox\source\yourproj\res\drawable-mdpi\icon.png" and project marked as a error in package explorer view. as soon as you replace icon.jpg with a real png file, bingo, apk automatically generated. Though I am not sure if this can detect all subtile android build error.

If you are using the ADT plugins greater than ADT17 then rename your "lib" folder to "libs".
Then Right click on project => Android tools => Fix project Properties => Clean your project
If still issue then just restart your eclipse. Your issue will be gone.

Please follow these steps; this might help you out:
Go to Project->Properties
Select Android from left-hand side list
Uncheck the "Is Library" checkbox
or
projects -> clean

Related

How to create an APK file from git project 'android-cv-bot-template'?

I downloaded the repo android-cv-bot-template and then open it in android studio, I want to generate own apk file but can't understand how to do that.
When I import project in AndroidStudio then I have error like This project does not use the Gradle build system. We recommend that you migrate to using the Gradle build system. And did't see any button to create an apk file.
Maybe I don't need to do that with android studio?
Added photo of Build
When i create own project from scartch in adnroid stuido then I can create apk, but when i download this project I can't. And i don't understand why
In Android studio's worktab you can hover over 'Build' and select 'build bundle'. In there you can choose to build an APK. After some time a popup comes on that tells you it is done building and where to find the file.

error running build target module is undefined

I have just installed Android Studio and when I'm trying to build I get this message:
error running build
target module is undefined
Go Run -> Edit Configurations...
Check Android Application (on the left)
Select your project
In the General tab slect a module (your app)
That worked for me
Today I had the same problem, these steps worked for me:
Close Android Studio
Edit local.properties in project folder, set sdk.dir path to the original android-sdk path which eclipse uses (ie. sdk.dir=c:\Users\Foo\android-sdks)
Load project again, a dialog appears which asks if you really want to use the other path, click yes. if it still does not work, then
Close Android Studio again
Edit local.properties again and set the path back to the original path
Load the project again, the dialog appears again, select yes
My project has been loaded correctly now, maybe it will also work for others, weird problem ;-)
Click Help -> Check For Update
In Android Studio Edit Configuration section look for Android Application. Then in the module select your app name. By default if project is imported this will be DEFAULT. Change this with your app name rebuild the app with gradle build and everything else will be good to go. Hope this helps.
Try to run the gradlew.bat file. This file will try to build your project. When the execution fail will prompt you the version of building tools your sdk miss. Install this version and your project will build.
gradlew.bat calls the environmental variable ANDROID_HOME which has to have as value the path of the android sdk, See from more information,
Android Studio Path (ANDROID-HOME) not able to set?

eclipse error "android.jar" missing

I'm trying to import my android projects to my new pc. but eclipse fires the following error-
"Project 'MyProject' is missing required library: 'C:\Users\myName\AppData\Local\Android\android-sdk\platforms\android-10\android.jar' Build path Build Path Problem.
but there is no folder called 'C:\Users\myName\AppData~", my user folder is 'C:\Users\PC\AppData~.
how to fix this guys??
Delete the android.jar from Project->Properties->Java Build Path
Right click on AndEngine go to Properties ->Android select Android 4.03 and click ok . This will build your project in Android 4.03 and get the required Andengine.jar file.
Change your computer name to "myName".
I also came across this kind of issue occationally, doing clean or selecting android project build target doesn't work, restart eclipse works though.
Your sdk have missing .jar file
Download android.jar file from https://github.com/Sable/android-platforms and paste it.
It will work fine on Windows and Linux

Android Studio build error or misconfigured

I am having trouble building with Android Studio on one of my computers. The same project was building fine and when I pushed to github and pulled from the other machine I get the following error
Argument 0 for #NotNull parameter of com/intellij/execution/configurations/GeneralCommandLine.setExePath must not be null
I tried generating a new default project and I get the same build error so it must be something with my setup.
Does anyone know what I can do to fix these issues? Or even how to completely uninstall Android Studio and start fresh? Thanks
I had same error. In my case it was caused because of modification some important configuration. I fixed the issue by executing following steps:
File -> Other Settings -> Default Project Structure
SDKs
Add new SDK (select JDK option)
Specify path to JDK (in my case it was "C:\Program Files\Java\jdk1.7.0_45")
Save changes
You can also check if you have configured path tho the Android SDK
Good luck!
Had the same problem. Had to uninstall Android Studio, delete all files related to it including install files, the .AndroidStudioPreview folder under your user directory, and those files made in your project's folder upon importing. This amounts to the idea folder and the [projectname].iml file. Now reinstall and re-import the project. You can reuse the same build.gradle. Mine's working now.

How do you compile an Android project into an .apk file in Eclipse without launching the emulator?

I'm just wondering because I have my own seperate method of getting it on my phone via my web server and the emulator is getting annoying popping up every time.
I had a problem that it would not build an APK for me (without Running) after I installed the latest SDK and latest Eclipse (Indigo 371).
Try this:
Go to Windows -> Preferences -> Android -> Build and uncheck "Skip packaging and dexing until export or launch" then restart Eclipse.
Now when you do Build Project you should get an APK
Do you use Eclipse with Android ADT plugin? If so, you can use Android Tools/Export Signed Application Package to build the app as apk file
Not sure if I understand your question right, but you can create an .apk file without running by right clicking your project, and then selecting Export.
The Android Application option should be available to you.
right click ur project -> select android tools -> and then select export unsigned application and save to a location. Done, ur apk is available
On the commandline, if sdk/tools is in your $PATH: run android update project -p . at least once, followed by ant release
From Eclipse: if Project > Build Automatically is off, Project > Build Project.
The apk is built in the bin/ directory.
by default, eclipse compiles your code into .apk on the fly.
.apk is generated in bin directory if i rememered right.
This can be cancelled by Project->Build Automatically. then you can build it under the same menu.
I had a similar problem but it didn't rebuild the apk file automatically or manually without running the emulator..
You have to make sure that there are no errors (warnings are okay) on any of your projects in the workspace!! after that, check the Build Automatically option in Project tab in Eclipse! from now on, Eclipse will automatically compile your project to apk all the tim
I have just started practicing with eclipse and I tried copying and installing the apk file from the 'bin' directory, onto my nexus 4. It worked perfectly.

Categories

Resources