alibaba / freeline

A super fast build tool for Android, an alternative to Instant Run
https://www.freelinebuild.com/
BSD 3-Clause "New" or "Revised" License
5.48k stars 623 forks source link

自定义apk生成路径后报错apk not found #56

Closed demoface closed 8 years ago

demoface commented 8 years ago

[DEBUG] [build_base_resource_task] build_base_resource_task finish in 0.3s [DEBUG] [install_apk_task] install_apk_task finish in 0.5s [DEBUG] [task_engine] task engine occurs exception, engine will exit. [DEBUG] [task_engine] it takes task engine 64.03s to execute tasks. [ERROR] -------------------------------------------------------- [ERROR] Freeline ERROR [ERROR] -------------------------------------------------------- apk path: D:\studiospace****\app\build\outputs\apk\app-official-debug.apk, n ot exists. [ERROR] -------------------------------------------------------- [ERROR] apk not found. [ERROR] -------------------------------------------------------- [DEBUG] Prepare tasks time: 0.4s [DEBUG] Task engine running time: 64.0s [DEBUG] Total time: 64.4s

lomanyong commented 8 years ago

@demoface 加入一个配置项:

freeline {
    apkPath "your path"
}
demoface commented 8 years ago

@lomanyong 这个apkpath是绝对路径吗,可以使用这种project.rootProject.buildDir.path吗

lomanyong commented 8 years ago

@demoface 可以的,你拼接一下就行

也可以类似这样apkPath project.rootProject.file("your-relative-path").getAbsolutePath()