I've got a dual-core 1.6Mhz CPU with 2G RAM, thus, I'm trying to use the emulator external to Eclipse and install/un-install the .apk using adb. When I try to build the project (after some code changes) without running it, Eclipse seems to-do nothing ?? any idea how to make Eclipse re-build the .apk without the need to Run it
Thank you
On a Mac menubar:
Eclipse -> Preferences
On Windows menubar:
Windows -> Preferences
From this Preferences window:
Android -> Build
Now uncheck "Skip packaging and dexing until export or launch. (Speeds up automatic builds on file save.)"
You may have to restart Eclipse for the preference change to actually be reflected.
By default, Eclipse auto-builds the .apk as you make changes. You can find this at any time in the your project's bin/ directory.
If there are no new changes (and you haven't performed a clean on the project) then requesting a build will do nothing as Eclipse has nothing to do; it already compiled the project for you.
Right click on your project in Eclipse. Choose "Android Tools". Choose "Export Unsigned Application Package".
I'm not much more experience than you are with Android, but from what I understand, the .apk is built incrementally as you modify the sources. So you don't have to do anything. Just save your code and use the .apk.
Related
Does anyone have such problems as:
Cannot install debug-apk because cannot find Application file, which exists in Androidmanifest.xml or:
The APK file /home/skullper/AndroidStudioProjects/app_pay/app/build/outputs/apk/app-debug.apk does not exist on disk.
Error while Installing APK
Of course I can fix this with ./gradlew assembleDebug, but I should launch this each time before run, otherwise it will run only assembleDebug build
Issue with kotlin std in projects with Java only
When I was using 3.0 everything was ok and I haven't such issues. What should I do to run my project???
UPDATE
Everything works. Answer in comments under question.
Thank to all who was trying to help
Try rebuilding your project and reinstall if nothing helps, I had this bug on my old computer and rebuilded helped.
Though if you reinstall Android Studio, make sure you delete the AVR folder properly! Otherwise the bits remaining from the previous version will alter the new installation completely useless.
did you try to go to Android Studio's File menu and select Invalidate Caches / Restart... option, then restart Android Studio?
If so try this:
1- Remove the directory ~/.gradle/caches/. It's OK to do this while Android Studio is opened. (Refer pm installing wrong package name)
2- Press "Sync project with Gradle files" icon on Android Studio
3- Run the project and the remote path will be correct.
Try this:
1 - Go to "Run/Debug configurations"
2 - In "Before launch" click in the "+"
3 - Add "Gradle-Aware Make"
4 - Click OK
Image here
Hope it helps
I want to test my app and I don't want to run emulator, unfortunately Windows 8.1 doesn't recognize my Samsung device. I want eclipse just to build the app's APK and I'll test the app by myself by using the file that is created in bin directory.
when you don't have any compatible emulator or any connected device, eclipse asks for running new emulator, I don't want see this dialog !
First: Consider fixing the problem with Windows recognizing your phone.
Second: You can use the Android SDK to make an APK - you can then transfer it to the device the way you prefer (download from webserver, e-mail eg.). Alternatively you can use Google Play + the alpha/beta testing feature to roll out tests to your device (+ any other device you want to test on).
In that case, Only Build the project, then in your project directory look for "bin" folder, you will find an APK file of your project there, you can copy that and install it later on your device
Hope this helps
Unfortunately, building the project alone won't create an APK file. You can export your project to get APK file. For exporting, right-click on your project in Eclipse and select Export..., then choose Export Android Application:
Please note that you have to create a key to export your project and sign it. If you want to create an unsigned package (which must be only used for testing purposes), right-click on your project, then from Android Tools select Export Unsigned Application Package:
You can get the application in the bin folder there you can find the apk.
You can build by running the command "ant clean release install" from your application folder.
On ecllipse editor try this:
go to Windows -> Select Preferences
then Android -> Build
Now uncheck "Skip packaging and dexing until export or launch. (Speeds up automatic builds on file save.)"
You may need to restart ecllipse.
Recently my Eclipse started to ignore java files changes and doesn't rebuild project automatically.
I change file, save it, then trying to launch it on device and see in logs that "application is already installed. This is means that apps on device and on desktop are identical.
If I uninstall app from the device and install again I see old applicaton, with old code. Debugging it is not possible since code is not synced.
Project will rebuild ok after cleanup or after resources changes but it's real pain to rebuild whole project after every code change.
It is just last few days. Why is it? Bad recent Eclipse autoupdate? How to fix it?
My Eclipse seems to be latest version available, IDE 4.3.2, no updates available, latest ADT.
Here is my build settings
Try looking at Window -> Preferences -> Android -> Build
Then look to see if 'Skip packaging and dexing until export or launch' is checked. If so then uncheck it.
I followed googles instructions and exported a test project from Eclipse by using the
Export -> Generate Gradle build files
opened up Android Studio and imported. After getting my support libraries working properly my project would compile with out any errors. My problem started when I tried to run the app on my device. When ever I try to run the app it directs me to use an AVD, never giving me the option to select my device. I obliged, created a new AVD but to no avail only to get build failed error. (I'll add the exact error when I can) NOTE: I can see my device is connected by clicking on "(6)Android" and the bottom left of the screen. I do see all logcat messages in verbose. I added android:debuggable="true"to my manifest but still nothing.
Confused I created a new project directly from Android Studio, hit run and bingo,...it gave me the option to use my device to run it or an AVD. Selecting either results in a successful launch of the dummy "Hello World" app. I think it may have something to do with build variants as my imported project doesn't specify "debug" vs "release" while the Android Studio generated project does.
Anyone else experiencing this?
I found the answer to my own question. Bit of a double whammy. Before installing Android Studio I updated my SDK via Eclipse (as recommended/required by google). Turns out by doing so a few items in my current projects got disconnected. ie. build paths, dependencies, ect. (you now have to place external Jar's in the src/libs folder)
Here is what I did to fix it.
In Eclipse, Preferences -> Java Built Path ->"Order and Export" tab. Make sure items are selected
If you have external Jars, manually copy and paste the jar in the libs folder of the project. (I did this in my Finder)
confirm the project launches via Eclipse
If it runs, export the project again by "Generate Gradle build files" (confirm overwriting existing files, if any)
5.Open Android Studio and re-import the project. Again, confirming overwriting of any existing files.
6.Next to the run bottom at the top of the screen click on the drop down next to your project name. Click "Edit Configurations..." and select "show chooser dialog" if not already selected.
clicked ok to exit,..and PRESTO!!! I finally have a successful project migration.
Hope this saves someone else time.
Cheers!
Yeah i have experienced similar stuff on Eclipse, its quite buggy. Since Android studio is based on it i would expect everything. Still the best solution to everything is to reload project, refresh project or restart IDE.
So I'm using Eclipse 4.2 to build my projects which imports native functions in Java.
Everything build fine with eclipse and yesterday everything worked fine.
Today my eclipse stopped to resolve jni.h headers and others android header and shows me errors.
My project builds correctly but eclipse forbids me running application with message saying that there are errors in my application.
I have all paths to symbols in project paths and symbols c,cpp.
And it was working without errors... My only solution right now is to build project, then restart eclipse and run application...
EDIT: oh... It's funny... Now eclipse doesn't start android emulator when i click run as...
EDIT2: even when I create new project...
EDIT3: Its funny... I had to add in avd device... I don't know how it is possible but for two days I've been using it without device in avd and it was working... (I haven't change api or anything like this and I haven't touch AVD Manager)
EDIT4: Strange things happenes in eclipse... I still don't know why eclipse has problems with includes...
It's a bug in ADT 20. Refer http://code.google.com/p/android/issues/detail?id=33788
Go with Alex' adwise until ADT 21 or a patch for ADT 20 is released.
[edit] BTW: you can always simply delete errors in the Problem list ;-)
You can go to Project|Properties|C/C++ General|Code Analysis then uncheck everything in there. That will provide for running your app until you figure out the proper fix.
You can do this by choosing Properties for the project
Properties -> C/C++ General -> Preprocessor Include..-> Entries -> Setting Entries -> CDT User Setting Entries
Add -> Include Directory -> File System Path, and enter the path of the includes like:
${NDK_ROOT}\platforms\android-5\arch-arm\usr\include
Also I found that this working for me only if I checked "Contains system headers" checkbox.