Android programming "no crunch" error - android

i've just installed eclipse and tried to run my first app, unfortunately the error below always
popped out:
Unknown option '--no-crunch' Android Asset Packaging Tool
I've done the following just like what people adviced but it DIDN'T HELP,
-After updating to ADT r14, go to Window -> SDK Manager (in Eclipse)
-Check on 'repository', uncheck "installed"
-Wait for packages to load, then select all support packages, accept all and install them
-Restart Eclipse
-Run your apps on new ADT r14, without 'crunch' errors
As a result, i keep getting prompt box asking me to momentarily keep deactivating my anti virus. because there might be a program that accessing the directory.
Can anyone please help & provide me the solution??
thank you

I had good luck updating the Android SDK tools to revision 15 and Android SDK Platform tools to revision 9. But this was a stab in the dark that worked. What I am trying to say is I don't understand the reasons for this to work. This solution is easy to try. If it works for you then vote for this answer.
There is a similar question on Stack Overflow at Google APIs throw no-crunch error for android
Other notes:
Running on Windows 7 and Eclipse Version: Indigo Service Release 1
Build id: 20110916-0149. Compiling for Android 2.2.
Also I updated my Java JDK yesterday to version 1.6.0_25, which may not be relevant but I can't think of another reason for this error to start today.
Android "no crunch" Eclipse aapt "Unknown option '--no-crunch'"

Well, this problem is mainly caused when you have ADT Plugin updated but not repositry in SDK Manager. In Eclipse, Instead of updating sdk manager from Windows -> Android SDK Manager -> Settings... It might not update and normally displays error: Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml. To avoid this, try this solution, hope it surely works:
Go to folder Android SDK where your sdk is placed(in my case"D:/Android SDK/android-sdk-Windows").
From this folder double click "SDK Manager.exe".
When Android SDK and AVD Manager window opened then click Settings.
In Proxy Settings, it will ask for a HTTP Proxy Server and HTTP Proxy Port.
Enter the IP address and the port number being asked.
In Misc Tab check "Force https://... "
Turn off your firewall and temporarily disable your antivirus.

Related

Android Studio SDK Installation Failed

I am trying to install Android Studio in Mac OS 10.12.3
I downloaded Android Studio v2.3 for mac.
It installs successfully, but when setting up for the first time, it always shows this error.
An error occurred while trying to compute required packages.
On clicking finish, i get
Failed to determine required packages
When i try to open SDK Manager, all options are disabled and it shows [this][3]. Even if i click on set sdk location, it gives me the same error as before.
I searched a lot in stack overflow and tried many suggestions, but nothing worked till now.
Things i tried:
Changed proxy settings, and added *.dl.google.com, *.dl-ssl.google.com in bypass proxys.
In android studio preferences, changed it to 'Auto Detect Proxy Settings'
Disabled Tunnelblick (i use it for VPN).
Deleted ~/.android everytime before trying
Changed permission to selected SDK folder to 777
Tried to run installer with sudo
Different SDK installer location
Once you've failed the install, click Finish (I believe twice) to get to the Android SDK launcher. Click on Settings -> Appearance & Behavior -> System Settings -> Updates and change the Update Channel to "Canary Channel".
Close out of the SDK and relaunch the Android Studio. It should go forward w/o issue.
Ok, after a lot of search, and asking for help, i found something. Maybe it can help someone else.
I still didn't figure out what was the problem, but i got a workaround.
Since android studio couldn't install SDK, i used homebrew to install android-sdk separately, and then linked that folder as ANDROID_HOME and then set that path in Android Studio SDK, and it worked.
There was some more problems i faced in updating SDK Tools, but updating from command line did the trick.
Now all works fine.

new AVD can't click on OK button, not system image [duplicate]

This problem sounds similar to a few others, except in my case the OK button is not grey-ed out. But for those who would rather not click the links...
Trying to create or edit an AVD from within Eclipse, after entering my settings, the "OK" button seems to be "clickable", but when I click it absolutely nothing happens.
I've made sure I have the appropriate system images installed, and that the target platform matches the API being used. Clearly a CPU has been chosen, skin set, etc... all the things that would make the OK button greyed out, which it's not.
I can create/edit AVDs if I run the AVD manager from outside eclipse, so this isn't the end of the world, but I feel there's a solution to this particular problem and I want to help solve it.
I've tried running eclipse as an administrator (that's what stopped the AVD manager from crashing outside of eclipse). I've tried just waiting around, or clicking multiple times. Looking at the Task Manager, no new processes begin when I click OK, nor does eclipse's CPU or RAM usage increase at all. The "Edit Android Virtual Device" window doesn't even go away.
Any clues?
(Running Indigo with the ADT plugin, btw, not the bundled version, which failed to work in a different way. Java 1.6.0 45. Windows 8, unfortunately. Plenty of RAM etc)
THIS IS A POSSIBLE WORKAROUND FOR BUGS IN ADT 22.6.0 ONLY, THESE BUGS SUBSEQUENTLY FIXED IN FOLLOWING BUILDS
Download and install new ADT v22.6.1 from here (zip) or use SDK manager to update
Seems like some bug from Google side, this problem found after "ADT 22.6" update. Widely reported on "Android Open Source Project - Issue Tracker" and nobody properly answered it yet.
However I was partially successful to create an AVD by opening "AVD manager.exe" from "Android SDK" for creating new AVD try to open directly AVD Manager.exe in SDK folder.
May be we have to wait for any conformation from Android community
Worked for me, sort of.. .
(Windows 8.1 Pro 64 Bit, Java JDK 1.7 Update 25, Eclipse Standard Kepler Service Release 1, Android Development Toolkit 22.6.0.v201403010043-1049357)
Update 1
Further research revealed that launching AVD Manager from SDK Manager (Tools --> Manage AVDs...) also works without any problems.
Update 2
More bad news is AVD creation not working from command line tool too.
Update 3
Assuming some parameter passed during launching AVD manager from Eclipse causes these problems
Update 4
Updated Java to JDK 1.7 Update 51 and Eclipse Standard SDK to Kepler Service Release 2 their latest and no resolution to the problems. Also tested under Debian and same results obtained.
Update 5
At https://code.google.com/p/android/issues/detail?id=66661 android project members conforms the problems and promises to fix by upcoming versions of ADT (22.6.1 - 22.6.3). At the mean time I would suggest to roll-back ADT to a lower version version 22.3.0
To uninstall current ADT go to
Help --> About Eclipse --> Installation Details --> Android Development Tools --> Uninstall
I may suggest uninstalling whole packages from Android (DDMS, Hierarchy Viewer, NDT, Traceview, OpenGL ES..etc..) to avoid any possible compatibility issues and install a fresh new ADT from above link through archive installation method.
Hope this will solve this problem temporarily. And wait for new release of ADT here.
Update 6
New ADT, version 22.6.1 is out now which will solve these problems
To elaborate on the statement "I can create/edit AVDs if I run the AVD manager from outside eclipse" in the OP:
Run the following on the command line
<android-sdk-location>/tools/android avd (on Linux in this case)
This launches the same AVD window you see when you click the AVD Manager icon in the eclipse toolbar. But this instance of the AVD manager does not have the bug, and you can create and run emulators as you did before the bug was introduced.
1 minute solution
I used a quick workaround where I cloned a device that already existed. The Clone button worked and I was able to successfully edit the clone.
Steps:
Select a Device by Google
Click the "Clone..." button
A window will pop up, click "Clone device"
Select the newly cloned Device, it should say "... by User"
Click the "Edit" button on the side
There you have it, you now have your own custom virtual device
Update and Solution: AsYashwanth Krishnan said, The bug in question is now fixed in later versions. I tried ADT 222.6.1 and ADT 22.6.2 , and they did not suffer from the bug of not not being able to create or edit Android Virtual Devices. The direct solution is to update you ADT to latest version, The workaround written below is left only for historical purposes.
Historical Workaround As #Yashwanth Krishnan said, this is a bug in ADT plugin 22.6; so best workaround is to rollback. for those asking how to rollback, here is a step-by-step guide:
First: Uninstall ADT plugin and all related plugins for android:
help->about
Installation details
Select android plugins and press uninstall button
Restart
Second: Download ADT 22.3.0 Archive from https://dl.google.com/android/ADT-22.3.0.zip
and install it
add repository from archive on local disk
Select android plugins
INFO:
I WAS able to create an AVD successfully after clicking OK several times and modifying some of my settings as a test.
I tried yashwanth krishnan solution and tried to open the AVD Manageer.exe directly without success. The manager will not open directly for me on Windows 8 x64. It tries to open, then shuts down immediately...
I met this issue too . The issue occurs in the latest version 22.6 which was released in March . Meanwhile I did the testing in 22.3 , the issue was not found .
So that I suggest that rollback the ADT to 22.3 and wait the new fix for 22.6
I banged my head on this for several hours until I found out that the default location was C:\username path\SDKs or something, where Android was installed on my system to D:\sdks\android_sdk_windows. So, changing the Eclipse Android directory to D:\sdks\android_sdk_windows fixed it.
I also heard that it may help things if you install the Android SDK to a path without spaces.
Hope this helps someone keep some hair.
Today I ran into the same problem after installing Maven. I messed around with different Path settings to get it to work and I ran into issues. I was also trying to install the google server for GCM. Somewhere in what I was doing I corrupted the Android Virtual Device Manager. I searched S.O. for an answer, then I decided to follow the first rule of TechSupport. I reinstalled the tool kit!
I went into the SDK manager and I uninstalled the tools (by clicking the Tool checkbox). It took several minutes to delete them all. Then I reinstalled the Tools which took about ten minutes. I rebooted Eclipse and the AVD and worked just like it did yesterday!
This time it only took a total of twenty minutes to fix.
Per the release notes, this problem has been resolved in revision 22.6.1, which is now available for download.
Updated your Android SDK Tools to 22.6.1 in Eclipse by selecting Window > Android SDK Manager and follow the prompts to install the update.
After that update finishes, select Help > Check for Updates and follow the prompts to update the appropriate Eclipse components.
After completing these updates, I tested the AVD functionality and it appears to be working properly.
i just copied the avds from a different system as descriped here:
Android - How to copy the emulator to a friend for testing
I faced the similar issue. I am using 23.0.2 version of android SDK.
"OK" button was disabled, but then I went to the path where android SDK was installed. In my case:
C:\Program Files\Android\android-sdk\
and executed AVD-Manager.exe by right clicking and selecting Run as an Administrator, and it worked like a charm.
Sometimes the AVD cannot be created because of this following error while starting:
x86 emulation currently requires hardware acceleration!
I was also facing this same issue. If u are facing the same, then it can be resolved by opening SDK Manager -> Under Extra -> Installed "Intel x86 Emulator Accelerator (HAXM Installer). Then when creating the AVD, select the proper CPU. This should work. :-)
For those posting that we need to set the sdcard size: I tried that and many other settings, and none of that helps. I get the NoClassDefFound Exception mentioned by mogilka, in the Error view. No configuration settings are going to fix that. It seems a bad update was pushed
Give some value for your sd card. May be something like 100 or 200

Unable to setup Eclipse for Android Development

Im having trouble installing Eclipse to develop Android apps. I have installed the android-sdk-windows as well as Eclipse Juno (running on Windows 8).
When I start Eclipse I get the message "This version of ADT requires Android SDK Tools revision 21.0.0.rc9 or above. Current version is 15.0.0. Please updaye your SDK tools to the latest version"
I then open my SDK manager, and select to update and install the package. But I get the error messages as per the images below
Can anyone please help with this as its driving me crazy. I have looked on here for solutions but a lot of the explanations get very technical or skip "obvious" steps and I get stuck. I have installed and unistalled a number of times, but no luck. I have manually tried to change the filename as per the second error message but it says the file is in use so I cant rename it. I have closed all internet explorer applications when trying this, as well as disabling Norton antivirus, but still no luck.
Make your download from this link Get SDK. It have the IDE Eclipse and the installation of the SDK already configured. Maybe this help you..
Exit Eclipse while having the SDK Manager open. Then press Yes. I think this is the problem.
You don't need to download sdk or other stuff. following steps
Pre-requestries : Install Jdk and setting the JAVA_HOME and install eclipse
Start Eclipse, then select Help --> Install New Software
Click Add, in the top-right Corner
In the Add Repository dialog enter "ADT Plugin" for Name & the following URL for Location
https://dl-ssl.google.com/android/eclipse/
Click OK
In the available software dialog check the Developer Tools and click, Next.
Read the license and accept it.
That it. Finish.
Hope you got the way.

Android SDK Error: Version

I have worked today on a project, which had no errors, and after a sort break, when I re-opened eclipse, I got the following error:
I have tried searching for a solution, but the error is to long in length to find any results.
I even downloaded the new 17 revision, but it didn't help.
So lets start by verifying the current version of ADT installed. Just in case:
Start Eclipse
Click Help
Click "About Eclipse"
Then choose the icon that has the android robot
In the new dialog you will see the ADT version. If this is NOT 17 then the error message does not lie and even though you may have tried to upgrade to version 17 it clearly has not. If it has then I would suggest a complete re-install of ADT and the SDK. You can follow the docs here http://developer.android.com/sdk/eclipse-adt.html#installing
One reason the update may have failed before you start pulling it all apart is that you may need to run eclipse as an administrator. I also find that SDK updates via the SDK manager have to be done as an administrator too.
When going from Eclipse to the SDK Manager I sometimes find that Eclipse has not started it with admin rights even though Eclipse has them. Therefore the update process then fails. I find it best to start the SDK manager with admin rights yourself, and then update the SDK manually and check the error log for any issues (normally the download works but then fails to copy the files for me if I am not in administrator mode).
EDIT/UPDATE:
Have you checked the ADT settings in Eclipse, especially the setting for SDK Location? Does it point to your up to date copy of the SDK? If it is having trouble opening the SDK manager then it could be the SDK is broken after attempting an update. I would uninstall it completely then download a fresh copy.
Restart eclipse after the download.
It shouldn't give you an error

Serious problems in Configuring Android SDK with Eclipse

I am having serious problems in Configuring ADT with Eclipse. I am using Windows 7 Home Premium version.
The Eclipse (64 bit) that I am using is:
Eclipse Classic 3.7.1
Eclipse Java EE IDE for Web Developers.
Version: Indigo Release
Build id: 20110615-0604
Java code runs without any problem in this Eclipse. For running Android:
at first, I went into Eclipse-> Help menu and then Install New Software.
Clicked Add, named it ADT and for location used: http://dl-ssl.google.com/android/eclipse.
The new window that appears, I have clicked all of those boxes and choose Next. Upto this point, everything is OK, ADT is installed and I am be asked to restart Eclipse. When Eclipse launches, a new window appears and asks me to either install the Android Software Development Kit (SDK) or choose an existing SDKs location. I chose to install Android Software Development Kit (SDK) (I checked all the options). I have set SDK location to: C:\My_Workspace\Android_SDK. After everything finishes I see two errors in the Eclipse console:
[2012-01-02 14:29:37 - DDMS] DDMS files not found: C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\platform-tools\adb.exe C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\hprof-conv.exe C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\traceview.bat
[2012-01-02 14:30:47 - DDMS] DDMS files not found: C:\My_Workspace\Android_SDK\platform-tools\adb.exe C:\My_Workspace\Android_SDK\tools\hprof-conv.exe C:\My_Workspace\Android_SDK\tools\traceview.bat
Note, I have tried to install the SDK at the default location given by Eclipse. But I see the same errors.
If I restart Eclipse an error appears saying:
"Could not find folder 'tools' inside SDK 'C:\My_Workspace\Android_SDK\'".
If I click into Window ->Android SDK manager, I get another error message saying:
"location of the Android SDK has not been setup in the preference."
If I go Window->Preference->Android, I see that, the SDK location is set to "C:\My_Workspace\Android_SDK"
But on top, there is an error message saying, "Could not find folder 'tools' inside SDK 'C:\My_Workspace\Android_SDK\'."
Inside the C:\My_Workspace\Android_SDK\ folder I see only two sub folders:
add-ons
platforms
But there is nothing inside these folders.
Inside "C:\Users\anis_huq.android" folder I see a folder called AVD (contents empty) and file called "ddms".
What is going on? I am confused!
P.S. the post: Could not find folder 'tools' inside SDK does not help my cause.
Problem solved after 1.5 days of work. This is how:
When you get the error:
[2012-01-02 14:29:37 - DDMS] DDMS files not found:
C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\platform-tools\adb.exe
C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\hprof-conv.exe
C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\traceview.bat
[2012-01-02 14:30:47 - DDMS] DDMS files not found:
C:\My_Workspace\Android_SDK\platform-tools\adb.exe
C:\My_Workspace\Android_SDK\tools\hprof-conv.exe
C:\My_Workspace\Android_SDK\tools\traceview.bat
go to the site: http://developer.android.com/sdk/index.html and download, install;
installer_r16-windows.exe
After the installation, you will still see some errors like:
Fetching
https:// dl-ssl.google.com/android/repository/addons_list-1.xml Failed
to fetch URL
https:// dl-ssl.google.com/android/repository/addons_list-1.xml,
reason: peer not authenticated Fetched Add-ons List successfully
Fetching URL:
https:// dl-ssl.google.com/android/repository/repository-5.xml Failed
to fetch URL
https:// dl-ssl.google.com/android/repository/repository-5.xml, reason:
peer not authenticated Done loading packages. Fetching URL:
https:// dl-ssl.google.com/android/repository/repository-5.xml Failed
to fetch URL
https:// dl-ssl.google.com/android/repository/repository-5.xml, reason:
peer not authenticated
The problem is not so evident from the error messages. We figured that, the HTTPS is actually causing the problem. So, start
Android SDK Manager->Tools->Options and now CHECK the box that says:
force https://... sources to be fetched using http://
and then click Packages->Reload.
Everything will be installed as your wish! Now run Eclipse->Window->Preferences->Android and set the location of the newly installed Android SDK (i.e. the location of "android-sdk" folder). And you are ready to go.
1.5 days wasted for this.
Try installing the Android SDK separately first. Then get Eclipse configured appropriately. You might need to run the SDK installer as an administrator in order to have some permissions set up appropriately.
Have you tried downloading ad installing the Android SDK manually, then pointing Eclipse to that location? You will need to run "SDK Manager.exe" to download at least one platform...
Also... Make sure you don't have any spaces in the path to the Android SDK and Eclipse or you might get strange errors.
In the last time I face all the time with such strange errors. The solution in these cases usually is the following.
I guess that you use JDK 7. Android SDK is not compatible with JDK 7. You have to use JDK 6 or JDK 5 (but 5 is too old). Am I right?
Remember the path where you install the android sdk and provide the correct location at window>preferences>android. On my windows 7 system the location is C:\Program Files (x86)\Android\android-sdk. After you provide location in preferences, click apply.
I had this too and just solved it. For me, it turned out that I didn't have all the libraries like the tools package.
Other things to keep in mind that helped me overcome related errors:
1) When giving urls from where to download, if the https doesn't work, try http
2) Run your eclipse as administrator if u r running it from Windows 7 - that will help you avoid permissions problems.

Categories

Resources