shwenzhang / AndResGuard

proguard resource for Android by wechat team
Apache License 2.0
8.54k stars 1.54k forks source link

Could not find SevenZip-1.2.17-osx-aarch_64.exe (com.tencent.mm:SevenZip:1.2.21). #471

Open lomoya90 opened 3 years ago

lomoya90 commented 3 years ago

我的开发环境是Mac on Apple M1,用的是: Android Studio Arctic Fox | 2020.3.1 Beta 3 Runtime version: 11.0.10+0-b96-7249189 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 11.2.3

gradle编译的时候,会提示: A problem occurred configuring project ':app'.

Could not resolve all files for configuration ':app:AndResGuardLocatorSevenZip'. Could not find SevenZip-1.2.21-osx-aarch_64.exe (com.tencent.mm:SevenZip:1.2.21). Searched in the following locations: https://mirrors.huaweicloud.com/repository/maven/com/tencent/mm/SevenZip/1.2.21/SevenZip-1.2.21-osx-aarch_64.exe

MankIndX commented 3 years ago
def isWindows() {
    return org.gradle.internal.os.OperatingSystem.current().isWindows()
}

andResGuard {
    use7zip = isWindows()
    sevenzip {
        if (isWindows()) {
            artifact = 'com.tencent.mm:SevenZip:1.2.21'
        }
    }
}

可以暂时这样解

lomoya90 commented 3 years ago

@MankIndX Thank you!

mandroidstudy commented 3 years ago

这种做法对我没有用,公司的项目集成了Tinker,andResGuard。请问还有其他解决办法吗,何时可以兼容呢

panmin commented 3 years ago

同问,我是集成到nexus上了,提示无法下载这个文件

mandroidstudy commented 10 months ago

已收到

wsx-planb commented 10 months ago
if (project.osdetector.classifier == "osx-aarch_64") {
        configurations.configureEach {
            if (it.name == "AndResGuardLocatorSevenZip") {
                project.dependencies.add(it.name, [group     : "com.tencent.mm",
                                                   name      : "SevenZip",
                                                   version   : "1.2.21",
                                                   classifier: "osx-x86_64",
                                                   ext       : 'exe'])
            }
        }
    } else {
        sevenzip {
            artifact = "com.tencent.mm:SevenZip:1.2.21"
        }
    }