Comments (13)
@pcyan 有具体日志吗?库项目都是支持的...
from freeline.
@lomanyong 修改java文件的话,报错是这样的
[ERROR] --------------------------------------------------------
[ERROR] Freeline ERROR
[ERROR] --------------------------------------------------------
警告: [options] 未与 -source 1.7 一起设置引导类路径
D:\workspace\TestLibrary_open\testapplication\build\freeline\freeline-backup-r\com\qiaoyun\qylibrary\R.java:10: 错误: 程序包io.pcyan.testapplication.R不存在
public static class anim extends io.pcyan.testapplication.R.anim {
^
D:\workspace\TestLibrary_open\testapplication\build\freeline\freeline-backup-r\com\qiaoyun\qylibrary\R.java:45: 错误: 程序包io.pcyan.testapplication.R不存在
public static class array extends io.pcyan.testapplication.R.array {
^
D:\workspace\TestLibrary_open\testapplication\build\freeline\freeline-backup-r\com\qiaoyun\qylibrary\R.java:49: 错误: 程序包io.pcyan.testapplication.R不存在
public static class attr extends io.pcyan.testapplication.R.attr {
^
D:\workspace\TestLibrary_open\testapplication\build\freeline\freeline-backup-r\com\qiaoyun\qylibrary\R.java:478: 错误: 程序包io.pcyan.testapplication.R不存在
public static class bool extends io.pcyan.testapplication.R.bool {
^
D:\workspace\TestLibrary_open\testapplication\build\freeline\freeline-backup-r\com\qiaoyun\qylibrary\R.java:488: 错误: 程序包io.pcyan.testapplication.R不存在
public static class color extends io.pcyan.testapplication.R.color {
^
D:\workspace\TestLibrary_open\testapplication\build\freeline\freeline-backup-r\com\qiaoyun\qylibrary\R.java:659: 错误: 程序包io.pcyan.testapplication.R不存在
public static class dimen extends io.pcyan.testapplication.R.dimen {
^
D:\workspace\TestLibrary_open\testapplication\build\freeline\freeline-backup-r\com\qiaoyun\qylibrary\R.java:962: 错误: 程序包io.pcyan.testapplication.R不存在
public static class drawable extends io.pcyan.testapplication.R.drawable {
^
D:\workspace\TestLibrary_open\testapplication\build\freeline\freeline-backup-r\com\qiaoyun\qylibrary\R.java:1355: 错误: 程序包io.pcyan.testapplication.R不存在
public static class id extends io.pcyan.testapplication.R.id {
^
D:\workspace\TestLibrary_open\testapplication\build\freeline\freeline-backup-r\com\qiaoyun\qylibrary\R.java:1759: 错误: 程序包io.pcyan.testapplication.R不存在
public static class integer extends io.pcyan.testapplication.R.integer {
^
D:\workspace\TestLibrary_open\testapplication\build\freeline\freeline-backup-r\com\qiaoyun\qylibrary\R.java:1784: 错误: 程序包io.pcyan.testapplication.R不存在
public static class layout extends io.pcyan.testapplication.R.layout {
^
D:\workspace\TestLibrary_open\testapplication\build\freeline\freeline-backup-r\com\qiaoyun\qylibrary\R.java:1902: 错误: 程序包io.pcyan.testapplication.R不存在
public static class string extends io.pcyan.testapplication.R.string {
^
D:\workspace\TestLibrary_open\testapplication\build\freeline\freeline-backup-r\com\qiaoyun\qylibrary\R.java:2514: 错误: 程序包io.pcyan.testapplication.R不存在
public static class style extends io.pcyan.testapplication.R.style {
^
D:\workspace\TestLibrary_open\testapplication\build\freeline\freeline-backup-r\com\qiaoyun\qylibrary\R.java:2940: 错误: 程序包io.pcyan.testapplication.R不存在
public static class styleable extends io.pcyan.testapplication.R.styleable {
^
D:\workspace\TestLibrary_open\qylibrary\src\main\java\com\qiaoyun\cguoguo\ui\activity\livepush\VideoLivePushUserActivity.java:68: 错误: 找不到符号
livePush_viewer_plv = (PLVideoView) viewStub.findViewById(R.id.livePush_viewer_plv);
^
符号: 变量 livePush_viewer_plv
位置: 类 id
14 个错误
1 个警告
修改资源文件增量编译可以通过,所以没有错误日志
from freeline.
@pcyan 可以删除掉freeline
和freeline_core
文件夹,然后重新执行一下gradlew.bat initFreeline
,再来看下这个问题是否还会复现。
from freeline.
@lomanyong 删除掉 freeline
和freeline_core
文件夹后问题复现
但是删除掉所有 freeline
的文件,包括 .zip
和 .py
文件后,重新gradlew.bat initFreeline
修改库中的java文件可以增量编译
。。。
资源文件还是老样子,可以通过增量编译,但是还是崩溃
我们是会在库中打开 asset
中的一个字体,增量编译后提示找不到字体然后就崩溃了
打开字体走的是 android.graphics.Typeface
的
/**
* Create a new typeface from the specified font data.
* @param mgr The application's asset manager
* @param path The file name of the font data in the assets directory
* @return The new typeface.
*/
public static Typeface createFromAsset(AssetManager mgr, String path) {
if (sFallbackFonts != null) {
FontFamily fontFamily = new FontFamily();
if (fontFamily.addFontFromAsset(mgr, path)) {
FontFamily[] families = { fontFamily };
return createFromFamiliesWithDefault(families);
}
}
throw new RuntimeException("Font asset not found " + path);
}
就是在这里抛出了异常
sFallbackFonts
是在init()
方法中初始化的
Typeface
的init()
方法只会走一遍
所以我怀疑是增量编译后,内存被回收了,没有重新初始化Typeface
导致抛出异常
from freeline.
@pcyan windows下的initFreeline更新看来还存在问题,这块我会继续优化一下w
增量编译资源的问题,可以解压缩一下${main_module}/build/freeline/base-res.so
这个文件,看下里面的assets文件夹里是否有你们的字体文件
from freeline.
@lomanyong ${main_module}/build/freeline/base-res.so
这个文件解压后assets
只有apktime
,并没有字体
from freeline.
@pcyan 你们的字体文件是否是放在library module的assets文件夹中呢?
from freeline.
@lomanyong 是的
路径为 {library_module}/src/main/assets/font.ttf
from freeline.
@pcyan 恩,这个地方是个bug,这个问题我今天跟进修复
from freeline.
@pcyan 这个问题升级0.5.4
版本后也可以解决了,可以升级试试看
from freeline.
@pcyan 升级0.5.4 然后重新initFreeline试试吧
from freeline.
@lomanyong @charvenhe 更新到 0.5.4
后增量编译能够定位到 asset
了
非常感谢
from freeline.
用compile 'com.joanzapata.iconify:android-iconify-ionicons:2.2.2'的话,修改res后无法增量编译,会报java.lang.RuntimeException: Font asset not found iconify/android-iconify-ionicons.ttf
from freeline.
Related Issues (20)
- 我是先安装python2.7.9,然后安装你们github上的教程仔细来,然后点击android studio 上的freeline按钮,没反应.最最重要的是我用命令来执行python freeline.py多次还是和第一次执行的时间一样长,并且还没原始的run时间短?请教下怎么回事?
- WARNING: Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'. It will be removed at the end of 2018. HOT 1
- Freeline 最新代码拉下来出错,无法下载1.0.0版本
- Freeline在Android Studio里面,无法搜索到,windows HOT 2
- gradle_tools.py 运行异常
- 不支持 Kotlin,一年没更新,卒。 HOT 3
- 好好的项目就这么凉了 HOT 3
- Jar Conflict about butterknife
- freeline提示No module named 'build_commands'无法运行 HOT 1
- 本地编译源代码,提示错误。com.antfortune.freeline:gradle:0.8.9-SNAPSHOT找不到
- Site offline
- 这么好的插件 怎么就凉了 HOT 3
- 纪念一下
- 与viewBinding 冲突 HOT 2
- Custom task is not recognized by jenkins
- JavaPoet Version collision With ViewBinding
- cannot use freeline in Android Studio 4.1.2, how to adapt Android Studio 4.1.2? HOT 2
- On Mac M1 ,Newest AndroidStudio "Could not find com.antfortune.freeline:gradle:0.8.8" HOT 1
- abnormal link
- 希望能够提供一个样例项目,第一步就配置不过去
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freeline.