Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

jacoco agent in 0.19.0.3 release #1635

Closed
dim0xff opened this issue Oct 15, 2018 · 5 comments
Closed

jacoco agent in 0.19.0.3 release #1635

dim0xff opened this issue Oct 15, 2018 · 5 comments

Comments

@dim0xff
Copy link

dim0xff commented Oct 15, 2018

I'm trying to upgrade weex lib for my app (from 0.18.0 to 0.19.0.3) from here:
https://bintray.com/alibabaweex/maven/weex_sdk#files/com/taobao/android/weex_sdk/0.19.0.3

But unfortunately I got error on app start:

E/AndroidRuntime: FATAL EXCEPTION: main
                  Process: my.sample.app, PID: 12213
                  java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jacoco/agent/rt/internal_b0d6a23/Offline;
                      at com.taobao.weex.WXSDKEngine.$jacocoInit(WXSDKEngine.java)
                      at com.taobao.weex.WXSDKEngine.<clinit>(WXSDKEngine.java)
                      at com.taobao.weex.WXSDKEngine.addCustomOptions(WXSDKEngine.java)
                      at my.sample.app.WXApplication.onCreate(WXApplication.java:96)
...

I don't need jacoco in my app, so, how could it be solved?

PS
Looking inside weex_sdk-0.19.0.3-release.aar I see that it is using org.jacoco.agent.rt.internal_b0d6a23.Offline

package com.taobao.weex;

import org.jacoco.agent.rt.internal_b0d6a23.Offline;

public final class BuildConfig {
    private static final transient /* synthetic */ boolean[] $jacocoData = null;
    public static final String APPLICATION_ID = "com.taobao.weex";
    public static final long ARMEABIV7_Size = 0;
    public static final long ARMEABI_Size = 0;
    public static final String BUILD_TYPE = "release";
    public static final boolean DEBUG = Boolean.parseBoolean("true");
    public static final boolean ENABLE_TRACE = false;
    public static final String FLAVOR = "";
    public static final int VERSION_CODE = 1;
    public static final String VERSION_NAME = "1.0";
    public static final long X86_Size = 0;
    public static final String buildJavascriptFrameworkVersion = "null";
    public static final String buildVersion = "0.19.0.3";

    private static /* synthetic */ boolean[] $jacocoInit() {
        boolean[] zArr = $jacocoData;
        if (zArr != null) {
            return zArr;
        }
        zArr = Offline.getProbes(4181343490275274697L, "com/taobao/weex/BuildConfig", 2);
        $jacocoData = zArr;
        return zArr;
    }

    public BuildConfig() {
        $jacocoInit()[0] = true;
    }

    static {
        boolean[] $jacocoInit = $jacocoInit();
        $jacocoInit[1] = true;
    }
}
@joy2helloworld
Copy link

@dim0xff 你好问下 你是通过gradle引用的 0.19.0.3吗,我这边引用不到。

@joy2helloworld
Copy link

遇到同样的问题 ,求解

@dim0xff
Copy link
Author

dim0xff commented Nov 15, 2018

The same with 19.0.0.5 release. I have in build.gradle

releaseCompile com.taobao.android:weex_sdk:0.19.0.5:release@aar'

And get this error when app starts:

11-15 23:15:16.263  1053 12888 D AES     : java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jacoco/agent/rt/internal_b0d6a23/Offline;
11-15 23:15:16.263  1053 12888 D AES     :      at com.taobao.weex.WXSDKEngine.$jacocoInit(Unknown Source)
11-15 23:15:16.263  1053 12888 D AES     :      at com.taobao.weex.WXSDKEngine.<clinit>(Unknown Source)
11-15 23:15:16.263  1053 12888 D AES     :      at com.taobao.weex.WXSDKEngine.addCustomOptions(Unknown Source)

@sivenwu
Copy link

sivenwu commented Nov 16, 2018

遇到同样的问题 ,求解

@Hanks10100 问题很严重啊,上线不可能用debug包吧,希望尽快解决

@YorkShen
Copy link
Contributor

YorkShen commented Dec 7, 2018

#1694

Sorry for the delay, you can use compile 'com.taobao.android:weex_sdk:0.19.0.7'. I have checked, it worked well

@YorkShen YorkShen closed this as completed Dec 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants