1
是我第一次使用Proguard。 default.properties并添加:我在一个示例项目,下面的代码(只是为了检查时堆栈跟踪模糊处理)Proguard简单示例错误
package com.proguardtest;
import android.app.Activity;
import android.os.Bundle;
public class ProguardTestActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
try{
Integer.parseInt("Test");
} catch (Exception e){
e.printStackTrace();
}
}
}
所以我创建一个新项目,然后转到文件测试它line
proguard.config=proguard.cfg
那就是结果文件:#这个文件是由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-7
proguard.config=proguard.cfg
然后我尝试时,我选择了路径,APK出现一个错误对话框显示到Dalvik的失败的转换生成与导出向导(Eclipse的Windows),然后在最后一步的APK。
我在做什么错?
在此先感谢
你有build.xml文件中改变了什么在任何机会使用上述方式之前? 尝试使用相同的Activity和default.properties文件创建新项目。从它看起来,它应该混淆你的APK没有特别的问题... – IncrediApp
我没有碰任何build.xml文件(甚至没有找到它^^) – Caroline