I am learning to create Android apps. My device is a Galaxy Note 3. When I run the app I get the error APK path is not specified. I have tried
Restarting the IDE and running as admin.
Tried messing with Project Structure.
Created a new project. Did not change any settings from defaults.
Tried creating various directories in the project directory.
Tried the instructions here that would push the app using a APK. Only thing now is that I need to figure out how to create a APK before running (obviously)
After trying for 6 hours and noticing using Eclipse was working fine. I renamed the .IntelliJIdea12 to generate a new profile. That fixed it.
I got it working. The error occurs because of apk path mismatch. Configuring the apk path as below should get it working.
In your module's .iml file specify the APK_PATH option:
<option name="APK_PATH" value="/build/apk/YourAppName-debug-unaligned.apk" />
Note: Your apk might not be located at /build/apk/. You can physically locate the apk by navigating through your app location and mention the path to that directory here.
Now rebuild your project. It should build and work as expected.
Related
So I am working on a Android app with Unity, and I use git (gitHub) for source control. The problem is that on my PC when I build the apk and install on a phone there are files in the Android/Data/{appName}/Files folder. That's a unexpected behaviour because I want to copy files there but only after starting the app. The interesting thing is that if I clone the repo and build the apk on my laptop it works fine, the files are only created on my phone when I start the apps and my own scripts copied them.
So my question is there a gradle or any build system configuration for this kind of behaviour? (I am not so familiar with gradle)
So basicly I tried going trough my git ignore list to find what can be the difference (the unity provided default on), but no luck.
Edit: The apks totally similiar, same size, etc
Changing the product name in the player settings solved worked, but I am not convinced the issue is solved.
Before AS was refusing to install the APK onto the Glass so I uninstalled it, deleted all the files, and reinstalled AS using the installer file downloaded from the website. I downloaded and updated all the APIs I need and now it is coming up with one of two errors:
IDE internal error occurred
Failed to set up Android modules in project 'My Application'
or
Error:Module 'app': platform 'Google Inc.:Glass Development Kit Preview:19' not found.
This is happening on both my desktop and my laptop(which I didn't reinstall AS on). There doesn't seem to be any pattern to these errors and I don't know what to do, each error I fix just uncovers another error.
Maybe AS is not looking in the right place for the SDK.
Change the location of the SDK and try again. If it still doesn't work, try to delete all the SDK files (or move them elsewhere). Warning!!! This will take a long time to re-download the files.
If it still doesn't work then you will have to take a backup of your project (copy the whole project folder), then delete the project from AS. Then make a new project and copy the program and everything back.
That's all I can help with.
Ok, so recently I've been trying to run my application on Android Studio (1.1.0), but every time I try to run it, the following error pops up:
Waiting for device
Target device: samsung-blah-blahblah
Uploading file local path: C:\Users\jimmykim9001\AndroidStudioProjects\blahblah\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/blah.com.blah
Local path doesn't exist.
Now by doing some research I've come to this link: https://www.youtube.com/watch?v=i4WcMIyc8OQ This would have been helpful if I was able to find my apk files when searching my project; however, they're not there, which is strange because I'm pretty sure they're supposed to be created automatically. So I tried to rebuild the project, but that fails half-way through (Failed to complete Gradle execution. Cause: ). What I need to do is get Android Studio to generate the app-debug.apk file, but I have no idea how. All the links I've found involve moving the file into the right place, but the file itself doesn't exist for me. Any ideas?
Note: I imported a jar file recently and ever since I did that, the problems started. Not sure if this matters or not.
I got your question. I have also faced the same problem some time ago. Let me clue you in , here is some approach i would like to try :-
Your apk must be here ( if it have been automatically generated)
your_app_name\app\build\outputs\apk
If app-debug.apk is not there then , Clear the cache File -> Invalidate Cache, then restart your IDE . Then rebuild it.
Try removing the jar you have recently added and rebuild the project.
you can try re-importing your project.
From above all what worked for me 1st point . Try these .................................best of luck.
Here are some links you might like to see....
Build unsigned APK file with Android Studio
Apk location in New Android Studio
I built a parallax live wallpaper with andEngine. I exported the .apk without any problems. I copied the project, updated the package and app name and everything needed to republish as a new .apk. The app tests fine on my tablet. But when I try to export it, it throws:
conversion to dalvik format failed with error 1
After hunting forums, here are the ways I've tried to fix the problem to no avail.
Update proGuard to it's latest version.
Updating the SDK to the latest version.
Removing project from workspace, changing it's directory and re-importing.
Removing everything but Android 'version#' in Java Build Path->libraries
Removing everything in Java Build Path->libraries and ran fix project properties.
Removing and regenerating the R.txt file in bin.
Clearing the .jar file from the libs directory.
Changing my .apk and keystore directory.
Cleaning the project after all of the above.
Refreshing the project after all of the above.
Running fix project properties after all of the above.
Occasionally the exporter won't throw the error. But it doesn't build the .apk, it just builds the keystore and closes.
I'm pretty stumped. If anyone has insight it would be invaluable.
Thank you so much.
I had the same problem with the latest Android SDK (API 17). I tried all of the above without success. Then I reverted all changes and this is what works for me now:
Clean project
Turn off Eclipce
Clean temp directory (on Windows, %TEMP%)
Turn on Eclipse, export (sometimes I clean the project once more)
What usually happens is that the temp directory will contain some files from previous export that cause problems and you can't delete them while they are used. Hence the "Turn off eclipse" step.
Note that some files will stay in temp and you won't be able to remove them - don't worry about it, some other programs use them.
How do I create Android app builds similar to Windows code builds? I have my Android app code base checked in to Tortoise SVN. But I also have the binaries checked in - i.e the apk file etc. and not just the source code. Everytime there is a change I am building it manually on Eclipse and then updating the apk and the code folders. Is there no mechanism to create builds like on Windows where you run a batch file running the visual studio exe to create builds and binaries. I need this because otherwise it s just replacing the apk's everytime. Its very frustrating that I dont know this simple detail so please help!
You can use ant building scripts (details at http://developer.android.com/guide/developing/building/building-cmdline.html).
Actually you have to just checkin your project to SVN. The other team member or even you when loading it in another working space (another PC or diff Eclipse WorkSpace), Eclipse will throw error.
Simply clean the project it should rebuild the app and APK files for you again. Nothing much to worry. Me and my friends have done it several times.
Correct me if I'm wrong.