GithubHelp home page GithubHelp logo

init error about freeline HOT 9 CLOSED

alibaba avatar alibaba commented on April 29, 2024 1
init error

from freeline.

Comments (9)

kaleai avatar kaleai commented on April 29, 2024

如果在as里面用终端是可以ok的。下面就是ok的情况:
Downloading lastest release from https://github.com/alibaba/freeline/releases/download/v0.5.3/freeline-v0.5.3-1608251800.zip
Please wait a minute...
[get] Getting: https://github.com/alibaba/freeline/releases/download/v0.5.3/freeline-v0.5.3-1608251800.zip
[get] To: D:\Github\freeline\sample\freeline.zip.tmp
[get] https://github.com/alibaba/freeline/releases/download/v0.5.3/freeline-v0.5.3-1608251800.zip moved to https://github-cloud.s3.amazonaws.com/releases/64864962/00b3e
48a-6aee-11e6-9f70-d7212f834403.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160825%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160825T1036
06Z&X-Amz-Expires=300&X-Amz-Signature=cccca22c2f08b7f8e56dfed311c6cdef16bf3d832b00226a1f5f704a575d9ee9&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attach
ment%3B%20filename%3Dfreeline-v0.5.3-1608251800.zip&response-content-type=application%2Foctet-stream
download success.
[unzip] Expanding: D:\Github\freeline\sample\freeline.zip into D:\Github\freeline\sample
unziped freeline.zip.
{
"project_type": "gradle",
"freeline_cache_dir": "C:\Users\46041.freeline\cache\aa8b50fc0a10c8672ed1c30501a13ecf",
"product_flavor": "develop",
"build_script": "gradle.bat assembleDevelopDebug",
"build_script_work_directory": "",
"root_dir": "D:\Github\freeline\sample",
"main_project_name": "app",
"main_project_dir": "app",
"build_directory": "D:\Github\freeline\sample\app\build",
"build_cache_dir": "D:\Github\freeline\sample\app\build\freeline",
"build_tools_version": "23.0.3",
"sdk_directory": "H:\Android\sdk",
"build_tools_directory": "H:\Android\sdk\build-tools\23.0.3",
"compile_sdk_version": "android-23",
"compile_sdk_directory": "H:\Android\sdk\platforms\android-23",
"package": "com.antfortune.freeline.sample",
"main_src_directory": [
"D:\Github\freeline\sample\app\src\main\java",
"D:\Github\freeline\sample\app\buildType\debug\java"
],
"main_res_directory": [
"D:\Github\freeline\sample\app\src\main\res"
],
"main_assets_directory": [
"D:\Github\freeline\sample\app\src\main\assets"
],
"main_manifest_path": "D:\Github\freeline\sample\app\src\main\AndroidManifest.xml",
"launcher": "com.antfortune.freeline.sample.MainActivity",
"apk_path": "D:\Github\freeline\sample\app\build\outputs\apk\app-develop-debug.apk",
"extra_dep_res_paths": [

],
"exclude_dep_res_paths": [

],
"main_r_path": "D:\\Github\\freeline\\sample\\app\\build\\generated\\source\\r\\develop\\debug\\com\\antfortune\\freeline\\sample\\R.java",
"project_source_sets": {
    "app": {
        "main_src_directory": [
            "D:\\Github\\freeline\\sample\\app\\src\\main\\java",
            "D:\\Github\\freeline\\sample\\app\\buildType\\debug\\java"
        ],
        "main_res_directory": [
            "D:\\Github\\freeline\\sample\\app\\src\\main\\res"
        ],
        "main_assets_directory": [
            "D:\\Github\\freeline\\sample\\app\\src\\main\\assets"
        ],
        "main_manifest_path": "D:\\Github\\freeline\\sample\\app\\src\\main\\AndroidManifest.xml"
    },
    "common": {
        "main_src_directory": [
            "D:\\Github\\freeline\\sample\\common\\src\\main\\java"
        ],
        "main_res_directory": [
            "D:\\Github\\freeline\\sample\\common\\src\\main\\res"
        ],
        "main_assets_directory": [
            "D:\\Github\\freeline\\sample\\common\\src\\main\\assets"
        ],
        "main_manifest_path": "D:\\Github\\freeline\\sample\\common\\src\\main\\AndroidManifest.xml"
    },
    "resources": {
        "main_src_directory": [
            "D:\\Github\\freeline\\sample\\resources\\src\\main\\java"
        ],
        "main_res_directory": [
            "D:\\Github\\freeline\\sample\\resources\\src\\main\\res"
        ],
        "main_assets_directory": [
            "D:\\Github\\freeline\\sample\\resources\\src\\main\\assets"
        ],
        "main_manifest_path": "D:\\Github\\freeline\\sample\\resources\\src\\main\\AndroidManifest.xml"
    },
    "payment": {
        "main_src_directory": [
            "D:\\Github\\freeline\\sample\\ThirdParty\\payment\\src\\main\\java"
        ],
        "main_res_directory": [
            "D:\\Github\\freeline\\sample\\ThirdParty\\payment\\src\\main\\res"
        ],
        "main_assets_directory": [
            "D:\\Github\\freeline\\sample\\ThirdParty\\payment\\src\\main\\assets"
        ],
        "main_manifest_path": "D:\\Github\\freeline\\sample\\ThirdParty\\payment\\src\\main\\AndroidManifest.xml"
    },
    "share": {
        "main_src_directory": [
            "D:\\Github\\freeline\\sample\\ThirdParty\\share\\src\\main\\java"
        ],
        "main_res_directory": [
            "D:\\Github\\freeline\\sample\\ThirdParty\\share\\src\\main\\res"
        ],
        "main_assets_directory": [
        ],                                                                                                                   
        "main_assets_directory": [                                                                                           
            "D:\\Github\\freeline\\sample\\ThirdParty\\share\\src\\main\\assets"                                             
        ],                                                                                                                   
        "main_manifest_path": "D:\\Github\\freeline\\sample\\ThirdParty\\share\\src\\main\\AndroidManifest.xml"              
    }                                                                                                                        
}                                                                                                                            

}
Save to C:\Users\46041.freeline\cache\aa8b50fc0a10c8672ed1c30501a13ecf\project_description.json

BUILD SUCCESSFUL

from freeline.

kaleai avatar kaleai commented on April 29, 2024

这时候如果执行py,会报错:

D:\Github\freeline\sample>freeline.py
Traceback (most recent call last):
  File "D:\Github\freeline\sample\freeline.py", line 5, in <module>
    from freeline_core.dispatcher import Dispatcher
  File "D:\Github\freeline\sample\freeline_core\__init__.py", line 1, in <module>
    import build_commands
ImportError: No module named 'build_commands'

from freeline.

kaleai avatar kaleai commented on April 29, 2024

python版本:

D:\Github\freeline\runtime>python
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

from freeline.

lomanyong avatar lomanyong commented on April 29, 2024

@tianzhijiexian 我们只在Python 2.7+下做过验证..没有测试过Python 3.5+的情况。

还有,目录下是否存在freeline_core/这个文件夹呢?

from freeline.

kaleai avatar kaleai commented on April 29, 2024

image
嗯,我也觉得可能是这个问题。因为正好是3.5+所以顺便做了测试,我换个2.7再看看吧。还是十分感谢作者,很佩服作者的坚持精神。

from freeline.

kaleai avatar kaleai commented on April 29, 2024

D:\Github\freeline\sample>freeline.py
[DEBUG] [dispatcher] command line args: Namespace(all=False, clean=False, cleanBuild=False, debug=False, init=False, version=Fals
e)
[DEBUG] find app has 0 java files modified.
[DEBUG] find share has 0 java files modified.
[DEBUG] find common has 0 java files modified.
[DEBUG] find resources has 0 java files modified.
[DEBUG] find payment has 0 java files modified.
[DEBUG] project just need a incremental build.
[DEBUG] file changed list:
{
"build_info": {
"last_clean_build_time": 1472131096.9908862,
"is_root_config_changed": false
},
"projects": {
"app": {
"src": [],
"assets": [],
"res": [],
"manifest": [],
"libs": [],
"config": []
},
"share": {
"src": [],
"assets": [],
"res": [],
"manifest": [],
"libs": [],
"config": []
},
"common": {
"src": [],
"assets": [],
"res": [],
"manifest": [],
"libs": [],
"config": []
},
"resources": {
"src": [],
"assets": [],
"res": [],
"manifest": [],
"libs": [],
"config": []
},
"payment": {
"src": [],
"assets": [],
"res": [],
"manifest": [],
"libs": [],
"config": []
}
}
}
[DEBUG] [task_engine] depth: 1, task: [connect_device_task]
[DEBUG] [task_engine] depth: 1, task: [gradle_aapt_task]
[DEBUG] [task_engine] depth: 2, task: [share]
[DEBUG] [task_engine] depth: 2, task: [payment]
[DEBUG] [task_engine] depth: 2, task: [resources]
[DEBUG] [task_engine] depth: 3, task: [common]
[DEBUG] [task_engine] depth: 6, task: [app]
[DEBUG] [task_engine] depth: 7, task: [merge_dex_task]
[DEBUG] [task_engine] depth: 9, task: [gradle_sync_task]
[DEBUG] [task_engine] depth: 10, task: [clean_cache_task]
[DEBUG] [task_engine] depth: 11, task: [update_stat_task]
[DEBUG] [connect_device_task] connect_device_task start to run after waiting 0.0s
[DEBUG] [gradle_aapt_task] gradle_aapt_task start to run after waiting 0.0s
[DEBUG] [sync_client] start to connect device...
[DEBUG] [sync_client] apktime path: D:\Github\freeline\sample\app\build\freeline\freeline-assets\apktime
[DEBUG] [gradle_aapt_task] no need to execute
[DEBUG] [gradle_aapt_task] gradle_aapt_task finish in 0.0s
[DEBUG] [sync_client] your local sync value is: 396000
[DEBUG] [share] share start to run after waiting 0.0s
[DEBUG] [payment] payment start to run after waiting 0.0s
[DEBUG] [resources] resources start to run after waiting 0.0s
[DEBUG] [payment_inc_invoker] payment old R.java path: ThirdParty\payment\build\generated\source\r\androidTest\debug\com\antfortu
ne\freeline\sample\payment\R.java
[DEBUG] [share_inc_invoker] share old R.java path: ThirdParty\share\build\generated\source\r\androidTest\debug\com\antfortune\fre
eline\sample\share\R.java
[DEBUG] [resources_inc_invoker] resources old R.java path: resources\build\generated\source\r\androidTest\debug\com\antfortune\fr
eeline\sample\resources\R.java
[DEBUG] [payment_inc_invoker] payment new R.java path: None
[DEBUG] [share_inc_invoker] share new R.java path: None
[DEBUG] [resources_inc_invoker] resources new R.java path: None
[DEBUG] [payment_inc_invoker] src changed files:
[DEBUG] [payment_inc_invoker] []
[DEBUG] [payment_inc_invoker] payment project has no change, need not go ahead
[DEBUG] [payment_inc_invoker] payment code only change R.java, need not go ahead
[DEBUG] [payment_inc_javac_compile] no need to execute
[DEBUG] [share_inc_invoker] src changed files:
[DEBUG] [resources_inc_invoker] src changed files:
[DEBUG] [share_inc_invoker] []
[DEBUG] [resources_inc_invoker] []
[DEBUG] [share_inc_invoker] share project has no change, need not go ahead
[DEBUG] [resources_inc_invoker] resources project has no change, need not go ahead
[DEBUG] [payment_inc_dex_compile] no need to execute
[DEBUG] [share_inc_invoker] share code only change R.java, need not go ahead
[DEBUG] [resources_inc_invoker] resources code only change R.java, need not go ahead
[DEBUG] [payment] payment finish in 0.0s
[DEBUG] [share_inc_javac_compile] no need to execute
[DEBUG] [resources_inc_javac_compile] no need to execute
[DEBUG] [share_inc_dex_compile] no need to execute
[DEBUG] [resources_inc_dex_compile] no need to execute
[DEBUG] [share] share finish in 0.0s
[DEBUG] [resources] resources finish in 0.0s
[DEBUG] [common] common start to run after waiting 0.0s
[DEBUG] [common_inc_invoker] common old R.java path: common\build\generated\source\r\androidTest\debug\com\antfortune\freeline\sa
mple\common\R.java
[DEBUG] [common_inc_invoker] common new R.java path: None
[DEBUG] [common_inc_invoker] src changed files:
[DEBUG] [common_inc_invoker] []
[DEBUG] [common_inc_invoker] common project has no change, need not go ahead
[DEBUG] [common_inc_invoker] common code only change R.java, need not go ahead
[DEBUG] [common_inc_javac_compile] no need to execute
[DEBUG] [common_inc_dex_compile] no need to execute
[DEBUG] [common] common finish in 0.0s
[DEBUG] [app] app start to run after waiting 0.0s
[DEBUG] [app_inc_invoker] app old R.java path: D:\Github\freeline\sample\app\build\generated\source\r\develop\debug\com\antfortun
e\freeline\sample\R.java
[DEBUG] [app_inc_invoker] app new R.java path: None
[DEBUG] [app_inc_invoker] src changed files:
[DEBUG] [app_inc_invoker] []
[DEBUG] [app_inc_invoker] app project has no change, need not go ahead
[DEBUG] [app_inc_invoker] app code only change R.java, need not go ahead
[DEBUG] [app_inc_javac_compile] no need to execute
[DEBUG] [app_inc_dex_compile] no need to execute
[DEBUG] [app] app finish in 0.0s
[DEBUG] [merge_dex_task] merge_dex_task start to run after waiting 0.0s
[DEBUG] [merge_dex_task] just 1 dex need to sync, copy D:\Github\freeline\sample\app\build\freeline\app\dex\app.dex to D:\Github
freeline\sample\app\build\freeline\increment.dex
[DEBUG] [merge_dex_task] merge_dex_task finish in 0.0s
[DEBUG] [sync_client] server result is 0
[DEBUG] [sync_client] check sync value failed, maybe you need a clean build.
[DEBUG] [connect_device_task] connect_device_task finish in 0.1s
[DEBUG] [gradle_sync_task] gradle_sync_task start to run after waiting 0.1s
[DEBUG] [clean_cache_task] clean_cache_task start to run after waiting 0.1s
[DEBUG] [update_stat_task] update_stat_task start to run after waiting 0.1s
[DEBUG] [task_engine] task engine occurs exception, engine will exit.
[DEBUG] [task_engine] it takes task engine 0.11s to execute tasks.
[DEBUG] [WARNING] check sync status failed, a clean build will be automatically executed.
[DEBUG] collecting project info, please wait a while...
[DEBUG] update apk time path: D:\Github\freeline\sample\app\build\freeline\freeline-assets\apktime
[DEBUG] new clean build flag value: 318000
[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] [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] generate_file_stat_task finish in 0.0s
[DEBUG] [read_project_info_task] read_project_info_task finish in 9.5s
[DEBUG] [gradle_clean_build_task] gradle_clean_build_task start to run after waiting 9.5s
[DEBUG] [gradle_clean_build_task] gradle_clean_build_task finish in 0.0s
[DEBUG] [clean_all_cache_task] clean_all_cache_task start to run after waiting 9.5s
[DEBUG] [install_apk_task] install_apk_task start to run after waiting 9.5s
[DEBUG] [build_base_resource_task] build_base_resource_task start to run after waiting 9.5s
[DEBUG] [generate_project_info_task] generate_project_info_task start to run after waiting 9.5s
[DEBUG] [task_engine] task engine occurs exception, engine will exit.
[DEBUG] [task_engine] task engine occurs exception, engine will exit.
[DEBUG] [task_engine] task engine occurs exception, engine will exit.
[DEBUG] [task_engine] it takes task engine 9.49s to execute tasks.
[DEBUG] [task_engine] it takes task engine 9.49s to execute tasks.
[DEBUG] [task_engine] it takes task engine 9.49s to execute tasks.
[ERROR] --------------------------------------------------------
[ERROR] Freeline ERROR
[ERROR] --------------------------------------------------------
Traceback (most recent call last):
File "D:\Github\freeline\sample\freeline_core\task.py", line 123, in execute
self.task.execute()
File "D:\Github\freeline\sample\freeline_core\gradle_clean_build.py", line 100, in execute
output, err, code = cexec(self._config['build_script'].split(' '), callback=None, cwd=cwd)
File "D:\Github\freeline\sample\freeline_core\utils.py", line 28, in cexec
p = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE, env=env, cwd=cwd)
File "D:\Python27\lib\subprocess.py", line 711, in init
errread, errwrite)
File "D:\Python27\lib\subprocess.py", line 959, in _execute_child
startupinfo)
WindowsError: [Error 2]

[ERROR] --------------------------------------------------------
[ERROR] unexpected exception within task
[ERROR] --------------------------------------------------------
[DEBUG] Prepare tasks time: 0.4s
[DEBUG] Task engine running time: 9.5s
[DEBUG] Total time: 9.9s
[DEBUG] --------------------------------------------------------

运行起来了,但是出现了这个错误 @lomanyong

from freeline.

lomanyong avatar lomanyong commented on April 29, 2024

@tianzhijiexian 把sample工程的gradle跟runtime版本都更新到0.5.3,然后重新执行gradlew.bat initFreeline -Pmirror,再来执行python freeline.py。抱歉哈,没有更新sample工程的依赖版本号。

from freeline.

kaleai avatar kaleai commented on April 29, 2024

我想问下,现在我改动代码后,该通过什么命令增量编译呢?比如我改动了1000行,我要让它同步到手机上该怎么做呢?

from freeline.

lomanyong avatar lomanyong commented on April 29, 2024

@tianzhijiexian 修改完代码直接执行python freeline.py即可,可以现在sample工程测试看看

from freeline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.