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

无法翻墙情况下,无法使用Freeline。报错Could not resolve all files for configuration ':classpath'. #1022

Open feixiang19913 opened 5 years ago

feixiang19913 commented 5 years ago

gradle配置是4.1,AS版本是3.0.1 代码中改动如下: 主项目的build.gradle中dependence添加classpath 'com.antfortune.freeline:gradle:0.8.8' app的build.gradle中添加apply plugin: 'com.antfortune.freeline' 以及testCompile 'junit:junit:4.12' debugCompile 'com.antfortune.freeline:runtime:0.8.8' releaseCompile 'com.antfortune.freeline:runtime-no-op:0.8.8' testCompile 'com.antfortune.freeline:runtime-no-op:0.8.8' initFreeline后项目中出现了Freeline和Freeline-core文件夹 工具栏出现Freeline图标按键

但是运行Freeline后出现以下报错: python freeline.py [DEBUG] [dispatcher] command line args: Namespace(all=False, clean=False, cleanBuild=False, debug=False, version=False, wait=False) [DEBUG] [dispatcher] Android Gradle Plugin Version: 3.0.1 [DEBUG] [dispatcher] Freeline Gradle Plugin Version: 0.8.8 [DEBUG] [dispatcher] *** Freeline Python Version: v0.8.8 [DEBUG] final apk not found, need a clean build. [DEBUG] collecting project info, please wait a while... [DEBUG] update apk time path: C:\Users\sunx\AndroidStudioProjects\DropPopMenu-master\app\build\freeline\freeline-assets\apktime [DEBUG] new clean build flag value: 955000 [DEBUG] [task_engine] depth: 1, task: [read_project_info_task] [DEBUG] [task_engine] depth: 1, task: [generate_file_stat_task] [DEBUG] [task_engine] depth: 2, task: [gradle_clean_build_task] [DEBUG] [task_engine] depth: 3, task: [clean_all_cache_task] [DEBUG] [task_engine] depth: 3, task: [install_apk_task] [DEBUG] [task_engine] depth: 4, task: [build_base_resource_task] [DEBUG] [task_engine] depth: 4, task: [generate_project_info_task] [DEBUG] [task_engine] depth: 4, task: [generate_apt_files_task] [DEBUG] [task_engine] depth: 4, task: [append_file_stat_task] [DEBUG] [read_project_info_task] read_project_info_task start to run after waiting 0.0s [DEBUG] [generate_file_stat_task] generate_file_stat_task start to run after waiting 0.0s [DEBUG] [generate_file_stat_task] save app module file stat [DEBUG] [generate_file_stat_task] generate_file_stat_task finish in 0.0s [DEBUG] [read_project_info_task] read_project_info_task finish in 44.1s [DEBUG] [gradle_clean_build_task] gradle_clean_build_task start to run after waiting 44.1s [DEBUG] [clean_all_cache_task] clean_all_cache_task start to run after waiting 44.1s [DEBUG] [generate_project_info_task] generate_project_info_task start to run after waiting 44.1s [DEBUG] [generate_apt_files_task] generate_apt_files_task start to run after waiting 0.0s [DEBUG] [build_base_resource_task] build_base_resource_task start to run after waiting 44.1s [DEBUG] [install_apk_task] install_apk_task start to run after waiting 44.1s [DEBUG] [append_file_stat_task] append_file_stat_task start to run after waiting 0.0s [DEBUG] [task_engine] task engine occurs exception, engine will exit. [DEBUG] [task_engine] it takes task engine 44.15s to execute tasks. [ERROR] -------------------------------------------------------- [ERROR] Freeline ERROR [ERROR] --------------------------------------------------------

FAILURE: Build failed with an exception.

BUILD FAILED in 43s

[ERROR] -------------------------------------------------------- [ERROR] freeline failed when read project info with script: gradlew.bat -q checkBeforeCleanBuild [ERROR] -------------------------------------------------------- [DEBUG] Prepare tasks time: 0.2s [DEBUG] Task engine running time: 44.2s [DEBUG] Total time: 44.3s [DEBUG] --------------------------------------------------------

但是在Android Studio文件夹中我找到了gradle-3.0.1.pom文件。 求问,有没有人遇到相似问题,怎么解决的?

act262 commented 5 years ago

你这是缺少Google仓库,gradle plugin3.0+已经不再从jcenter下载了,所以需要设置google仓库