简体   繁体   中英

Android SDK r18 export release error

I've 2 Android projects in workspace; first is libray project and other is application that refers to first project. Clean and Build is fine without any error. But when I try to export release build it gives error: "Conversion to Dalvik format failed with error 1"

Please, help.

SOLUTION 1:

Are you using proguard? if so.. you might want to replace the one in the sdk (C:\\android-sdk\\tools2\\proguard*) with the latest version from here .

You can rename the old proguard to proguard2 and place the downloaded version in C:\\android-sdk\\tools2\\proguard*

*Note: the folder of your AndroidSDK might be different


SOLUTION 2:

If you had imported other projects as libraries for the main project you might check if those libraries are imported twice:

Android库Android构建路径

Those Images were extracted from this answer


SOLUTION 3:

Create a new Android project with the same package name, copy all your resources, Manifest and source files, configure the external libraries and then try to compile the new project

That usually happens when you have android.jar accidentally included twice. Go into your project's Properties > Java Build Path > Libraries and remove the one that's not under the Android XY drop-down.

Problem solved. Removed r18 and went for r17 and then every thing is fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM