Coder Social home page Coder Social logo

Comments (4)

shifujun avatar shifujun commented on May 21, 2024

悲剧啊。是#46 给改坏了。MultiDex之前是有手工测试用例测过的,自动化测试用例没写,所以#46 就没发现有问题。

先补上了自动化测试用例 #50 然后再看是什么原因。

由此可见自动化测试覆盖程度对插件框架真的是非常重要的。

from shadow.

shifujun avatar shifujun commented on May 21, 2024

#51 应该修复了问题

from shadow.

SpenceAcc avatar SpenceAcc commented on May 21, 2024

拉取了#51的代码后,在4.4系统下的MultiDex报错如下
07-22 17:15:26.696 5163-5163/com.yihuo.goldtiger.shadow:plugin E/MultiDex: Failed to create dir /data/data/com.yihuo.goldtiger.shadow/files/ShadowPlugin_sample-plugin/dataDir/code_cache. parent file is a dir false, a file false, exists false, readable false, writable false
当前文件目录截图如下
image

Shadow/projects/sdk/core/loader/src/main/kotlin/com/tencent/shadow/core/loader/blocs/LoadPluginBloc.kt

是不是LoadPluginBloc.kt文件下的文件未能创建成功?导致目录异常了。

val dataDir = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
tempContext.dataDir
} else {
File(tempContext.filesDir, "dataDir")
}

from shadow.

shifujun avatar shifujun commented on May 21, 2024

不知道为什么我的4.4虚拟机没能复现。但看起来就是dataDir目录不存在造成的。
你那里能复现的话,能不能试一下加一行dataDir.mkdirs()?

from shadow.

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.