Comments (4)
I solved this problem by modifying CopyDependenciesTask.groovy please have a try
def processValuesResource(String tempFolder) {
File valuesSourceFile = new File("${tempFolder}/res/values/values.xml")
File valuesDestFile = new File("${temporaryDir.path}/${variantName}/res/values/values.xml")
if (valuesSourceFile.exists()) {
if (!valuesDestFile.exists()) {
project.copy {
from "${tempFolder}/res"
include "values/*"
into "${temporaryDir.path}/${variantName}/res"
}
} else {
def valuesSource = new XmlSlurper().parse(valuesSourceFile)
def valuesDest = new XmlSlurper().parse(valuesDestFile)
valuesSource.children().each {
valuesDest.appendNode(it)
}
}
FileOutputStream fileOutputStream = new FileOutputStream(valuesDestFile, false)
byte[] myBytes = XmlUtil.serialize(valuesDest).getBytes("UTF-8") // !!!修改了这
fileOutputStream.write(myBytes)
fileOutputStream.close()
}
}
}
from fataar-gradle-plugin.
Hey @BigggFish, thanks for your contribution. Your solution is correct, why don't you give me a pull request?
from fataar-gradle-plugin.
from fataar-gradle-plugin.
this error still occur in my project
Execution failed for task ':module_sdk:copyReleaseDependencies'.
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 1 字节的 UTF-8 序列的字节 1 无效。
And I have used the lastest.
classpath "com.mobbeel.plugin:fat-aar:2.0.3"
Could you help me to resolve this?
from fataar-gradle-plugin.
Related Issues (20)
- Rewrite plugin to Kotlin
- Wrong detection of JAVA library as Android lib HOT 1
- Do not support publish generated aar to maven HOT 2
- Test issue
- Native libs locate on jniLibs folder doesn't copy to output AAR
- Support Gradle plugin 3.2.x. and 3.3.x [Improvement] HOT 8
- Run assembleRelease or assembleDebug task of example-lib, the output aar does not include the nested-lib and nested-native-lib HOT 5
- Missing required attribute: dependency groupId POM HOT 2
- two libraries can't merge to one aar file
- Doesn't build project dependencies HOT 3
- Error building AAR
- BUILD FAILED when building fat AAR HOT 2
- need support for local aar HOT 1
- Auto merge AndroidManifest.xml
- Modules in subfolder
- Resources R.java is not working properly HOT 1
- Merge layouts
- Merging resources causing package R to not exist HOT 10
- No source code included HOT 2
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 fataar-gradle-plugin.