install` `चींटी डिबग के साथ Android के आवेदन के पुनर्निर्माण नहीं के साथ बनाई गई एक साफ परियोजना के साथ शुरू:चींटी
android create project -n something -t android-7 -p something -k com.example.something -a Something
जब मैं ant debug install
चलाने के लिए और मेरी एमुलेटर में आवेदन खोलते हैं, तो मैं देख रहा हूँ (उम्मीद के रूप में)
यहां यह बुरा है। अब मैं एप्लिकेशन में कुछ मामूली बदल देता हूं।
package com.example.something;
import android.app.Activity;
import android.os.Bundle;
public class Something extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.main); REMOVED
}
}
अब मैं ant debug install
साथ आवेदन के पुनर्निर्माण और एमुलेटर में इसे चलाने: इस उदाहरण में, मैं तो यह इस तरह दिखता है मुख्य गतिविधि से setContentView
कॉल दूर करने के लिए जा रहा हूँ।
यह गलत है: मैं इस को देखते हैं। मैंने बस अपने पिछले संपादन के साथ पाठ हटा दिया। अगर मैं ant debug install
से पहले ant clean
करते हैं, मैं उम्मीद परिणाम प्राप्त:
मैं हर बार जब मैं ant debug install
चलाने से पहले ant clean
चलाने के लिए है करने के लिए नहीं करना चाहती। मैं वास्तव में ant clean
चलाने के बिना वास्तव में प्रोग्राम को पुनर्निर्माण कैसे कर सकता हूं?
विवरण:
$ ant debug install
Buildfile: /home/x/android/something/build.xml
-set-mode-check:
-set-debug-files:
-set-debug-mode:
-debug-obfuscation-check:
-setup:
[echo] Gathering info for something...
[setup] Android SDK Tools Revision 16
[setup] Project Target: Android 2.1
[setup] API level: 7
[setup]
[setup] ------------------
[setup] Resolving library dependencies:
[setup] No library dependencies.
[setup]
[setup] ------------------
[setup]
[setup] WARNING: No minSdkVersion value set. Application will install on all Android versions.
-build-setup:
[echo] Creating output directories if needed...
[mkdir] Created dir: /home/x/android/something/bin
[mkdir] Created dir: /home/x/android/something/bin/res
[mkdir] Created dir: /home/x/android/something/gen
[mkdir] Created dir: /home/x/android/something/bin/classes
-pre-build:
-code-gen:
[echo] ----------
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[renderscript] No RenderScript files to compile.
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...
-pre-compile:
-compile:
[javac] Compiling 2 source files to /home/x/android/something/bin/classes
-post-compile:
-obfuscate:
-dex:
[dex] Converting compiled files and external libraries into /home/x/android/something/bin/classes.dex...
-crunch:
[crunch] Crunching PNG Files in source dir: /home/x/android/something/res
[crunch] To destination dir: /home/x/android/something/bin/res
[crunch] Crunched 0 PNG files to update cache
-package-resources:
[aapt] Creating full resource package...
-package:
[apkbuilder] Current build type is different than previous build: forced apkbuilder run.
[apkbuilder] Creating something-debug-unaligned.apk and signing it with a debug key...
-do-debug:
[zipalign] Running zip align on final apk...
[echo] Debug Package: /home/x/android/something/bin/something-debug.apk
debug:
[propertyfile] Creating new property file: /home/x/android/something/bin/build.prop
[propertyfile] Updating property file: /home/x/android/something/bin/build.prop
[propertyfile] Updating property file: /home/x/android/something/bin/build.prop
[propertyfile] Updating property file: /home/x/android/something/bin/build.prop
install:
[echo] Installing /home/x/android/something/bin/something-debug.apk onto default emulator or device...
[exec] 66 KB/s (4410 bytes in 0.065s)
[exec] pkg: /data/local/tmp/something-debug.apk
[exec] Success
BUILD SUCCESSFUL
Total time: 5 seconds
यहाँ संपादन के बाद दूसरा ant debug install
से उत्पादन है::
यहाँ inital ant debug install
से उत्पादन है
$ ant debug install
Buildfile: /home/x/android/something/build.xml
-set-mode-check:
-set-debug-files:
-set-debug-mode:
-debug-obfuscation-check:
-setup:
[echo] Gathering info for something...
[setup] Android SDK Tools Revision 16
[setup] Project Target: Android 2.1
[setup] API level: 7
[setup]
[setup] ------------------
[setup] Resolving library dependencies:
[setup] No library dependencies.
[setup]
[setup] ------------------
[setup]
[setup] WARNING: No minSdkVersion value set. Application will install on all Android versions.
-build-setup:
[echo] Creating output directories if needed...
-pre-build:
-code-gen:
[echo] ----------
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[renderscript] No RenderScript files to compile.
[echo] ----------
[echo] Handling Resources...
[aapt] No changed resources. R.java and Manifest.java untouched.
-pre-compile:
-compile:
[javac] Compiling 1 source file to /home/x/android/something/bin/classes
-post-compile:
-obfuscate:
-dex:
[dex] No new compiled code. No need to convert bytecode to dalvik format.
-crunch:
[crunch] Crunching PNG Files in source dir: /home/x/android/something/res
[crunch] To destination dir: /home/x/android/something/bin/res
[crunch] Crunched 0 PNG files to update cache
-package-resources:
[aapt] No changed resources or assets. something.ap_ remains untouched
-package:
[apkbuilder] No changes. No need to create apk.
-do-debug:
[zipalign] No changes. No need to run zip-align on the apk.
[echo] Debug Package: /home/x/android/something/bin/something-debug.apk
debug:
[propertyfile] Updating property file: /home/x/android/something/bin/build.prop
[propertyfile] Updating property file: /home/x/android/something/bin/build.prop
[propertyfile] Updating property file: /home/x/android/something/bin/build.prop
[propertyfile] Updating property file: /home/x/android/something/bin/build.prop
install:
[echo] Installing /home/x/android/something/bin/something-debug.apk onto default emulator or device...
[exec] 88 KB/s (4410 bytes in 0.048s)
[exec] pkg: /data/local/tmp/something-debug.apk
[exec] Success
BUILD SUCCESSFUL
Total time: 3 seconds
सूचना है कि -dex
, -package
, और -debug
सभी कदम यह सोचते हैं कि मैंने कुछ भी नहीं बदला है।
सटीक एक ही समस्या यहाँ के बाद से मैं एक नया लैपटॉप का प्रयोग किया, यह पता लगाने की क्या अलग .. चींटी 1.8.2 के साथ एसडीके R16 का उपयोग कोशिश कर रहा। – brk3
किसी ने परीक्षण किया है कि यह अभी भी नवीनतम आर 17 अपडेट के साथ होता है? – brk3
बगट्रैकर के मुताबिक, यह नए आर 17 में तय किया गया है http://code.google.com/p/android/issues/detail?id=22948 – HighCat