This happens instantly when I make a new project in Eclipse.
I only have 1 jar file in the project, I have tried to remove it, and add it again, several times, and cleaned the project after this.
I have updated ProGuard (I think), downloaded the new version, and replaced the lib folder as the threads on here said.
My default.properties file looks like this:
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "build.properties", and override values to adapt the script to your
# project structure.
# Project target.
target=android-8
So can't comment anything about ProGuard which was also mentioned in another thread.
I feel I have tried everything, and still this bug.
One thing I have noticed though if I go to:
window -> preferences -> android -> build
. And uncheck "Force error when external jars contain native libraries". Then I get: "Can't resolve R" instead of the Dalvik error.
There is no import named android.R
either.
Anyone with some help please?
This doesn't look like the issue with proguard, since it's not even enabled in your defaults.properties file. Try the following:
Eclipse sometimes likes to add an import android.R statement at the top of your files that use resources, especially when you ask eclipse to sort or otherwise manage imports. This will cause your make to break. Look out for these erroneous import statements and delete them.
UPDATE
Have a look also at this thread: "Conversion to Dalvik format failed with error 1" on external JAR.
Check the following answers (link will bring you directly to the answer):
I had mistakenly added a reference to a copy of android.jar, which was not required as it is an android dependency, I removed this and the error went away.
I started having this problem as well... The only thing that fixed it for me was manually downlaoding the newest version of ProGuard (currently 4.6) and replacing the SDK's version of Proguard's bin and lib folders with the newest verison.
After that everything started working again. This is apparently a logged bug... http://code.google.com/p/android/issues/detail?id=18359
Do you have the new Android SDK? If you do, you have to download the proguard.jar from the proguard website and replace it on the SDK directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With