android ant build无法安装apk但是可以通过IDE工作吗?

时间:2014-01-03 11:39:11

标签: android ant jenkins crashlytics

我正在尝试通过jenkins和ant构建一个Android应用程序,问题是一旦构建没有错误,应用程序在安装后由于崩溃而无法启动。

完全相同的应用程序使用像Eclipse这样的IDE构建和运行完美,并且所有必要的crashlyitics库都位于projects / lib文件夹中。

这是启动应用程序时错误的堆栈跟踪。

01-03 10:56:24.351: E/AndroidRuntime(8119): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jr/com.jr.HomeActivity}: com.crashlytics.android.CrashlyticsMissingDependencyException: 
01-03 10:56:24.351: E/AndroidRuntime(8119): This app relies on Crashlytics. Configure your build environment here: 
01-03 10:56:24.351: E/AndroidRuntime(8119): https://crashlytics.com/register/4346dsd1c0dsadadq77cf/android/com.jr
01-03 10:56:24.351: E/AndroidRuntime(8119):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
01-03 10:56:24.351: E/AndroidRuntime(8119):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
01-03 10:56:24.351: E/AndroidRuntime(8119):     at android.app.ActivityThread.access$800(ActivityThread.java:135)
01-03 10:56:24.351: E/AndroidRuntime(8119):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
01-03 10:56:24.351: E/AndroidRuntime(8119):     at android.os.Handler.dispatchMessage(Handler.java:102)
01-03 10:56:24.351: E/AndroidRuntime(8119):     at android.os.Looper.loop(Looper.java:136)
01-03 10:56:24.351: E/AndroidRuntime(8119):     at android.app.ActivityThread.main(ActivityThread.java:5017)
01-03 10:56:24.351: E/AndroidRuntime(8119):     at java.lang.reflect.Method.invokeNative(Native Method)
01-03 10:56:24.351: E/AndroidRuntime(8119):     at java.lang.reflect.Method.invoke(Method.java:515)
01-03 10:56:24.351: E/AndroidRuntime(8119):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
01-03 10:56:24.351: E/AndroidRuntime(8119):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
01-03 10:56:24.351: E/AndroidRuntime(8119):     at dalvik.system.NativeStart.main(Native Method)
01-03 10:56:24.351: E/AndroidRuntime(8119): Caused by: com.crashlytics.android.CrashlyticsMissingDependencyException: 
01-03 10:56:24.351: E/AndroidRuntime(8119): This app relies on Crashlytics. Configure your build environment here: 
01-03 10:56:24.351: E/AndroidRuntime(8119): https://crashlytics.com/register/fdsfdsfdsfdsfdssdfdsf/android/com.jr
01-03 10:56:24.351: E/AndroidRuntime(8119):     at com.crashlytics.android.j.a(SourceFile:52)
01-03 10:56:24.351: E/AndroidRuntime(8119):     at com.crashlytics.android.Crashlytics.a(SourceFile:913)
01-03 10:56:24.351: E/AndroidRuntime(8119):     at com.crashlytics.android.Crashlytics.start(SourceFile:212)
01-03 10:56:24.351: E/AndroidRuntime(8119):     at com.crashlytics.android.Crashlytics.start(SourceFile:190)
01-03 10:56:24.351: E/AndroidRuntime(8119):     at com.jr.HomeActivity.onCreate(HomeActivity.java:134)
01-03 10:56:24.351: E/AndroidRuntime(8119):     at android.app.Activity.performCreate(Activity.java:5231)
01-03 10:56:24.351: E/AndroidRuntime(8119):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
01-03 10:56:24.351: E/AndroidRuntime(8119):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
01-03 10:56:24.351: E/AndroidRuntime(8119):     ... 11 more

3 个答案:

答案 0 :(得分:1)

好吧他们在logcat中提到的lib:

https://crashlytics.com/register/4346dsd1c0dsadadq77cf/android/com.jr

它可能缺少libs文件夹,或Jenkins没有把它拿起来

答案 1 :(得分:1)

来自Crashlytics的Hemal!

如果你浏览Ant setup,那么你会很高兴:)

答案 2 :(得分:1)

只需在装配前运行./gradlew clean