Comments (21)
@d-moreira it should work in different OS. Could you find the res
folder on your project?
from androidlibrary.
Hi @efraespada,
yes I can. The project is version controlled here on GitHub so the code is exactly the same on both machines. I'm thinking this issue may be related with some sort of setting, or something that is affecting the way the plugin finds the paths to the files... Do you have any idea?
On the same machine, on version 0.4.1
, I couldn't use the plugin either. There was some error
when the plugin tried to run the AndroidStringObfuscator.jar
file. This is the log:
FAILURE: Build failed with an exception.
* Where:
Build file 'path_to_project/android-app/app/build.gradle' line: 178
* What went wrong:
Execution failed for task ':app:mergeDevelopmentDebugResources'.
> Process 'command '/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Hope this can help you track the issue.
from androidlibrary.
@d-moreira could it be a problem with Java
? Type java -version
on terminal, are you getting anything like this?
$ java -version
java version "1.8.0_152"
If it is not a Java problem, run this:
./gradlew lint --stacktrace
Tell me what you receive.
from androidlibrary.
These are the logs on a machine with the problem and on a machine where everything is working.
from androidlibrary.
@d-moreira I can't see the problem 😅
Don't worry. I'll build a new version with a debug
flag to print everything related with resources folder. Thanks for your patient.
from androidlibrary.
Hello @efraespada, any news on this?
from androidlibrary.
Happy new year @d-moreira, last weeks I was on other project, so this was stopped but I kept it in mind. Did you try to clone the repo and open it with Android Studio?
from androidlibrary.
@d-moreira I just released a new version, 0.3
. 🤞🏼
Note now for apply plugin you must use:
apply plugin: StringCare
Readme is updated.
from androidlibrary.
Hi @efraespada,
sorry for the delayed reply but I have limited access to the machine with problems. I tested the new release and it is still not working.
I run a build with debug=true
and the only useful info that I can see is that it is not finding the folder with the strings:
:app:backupStringResources
source folder not found: src/main
:app:encryptStringResources
source folder not found: src/main
:app:restoreStringResources
restore folder not found
Any idea on what's happening and how to fix it?
from androidlibrary.
@d-moreira you must use debug
right this way:
stringcare {
debug true
}
It should confirm your release
signing config is defined.
........................................................................................................................................................
I found a bug that didn't allow the plugin to look for the right module. It should be fixed 🤔
Check if both soft (library and plugin) are the latest version -> 0.3
Use (on Android Studio) File -> Invalidate Caches / Restart... and sync Gradle.
from androidlibrary.
I'm doing that and using the correct software versions. I have something like:
stringcare {
debug true
modules {
app {
stringFiles = ['secrets.xml']
srcFolders = ['src/main']
}
}
}
But the plugin can't find the src/main
folder when I run the project on one particular pc. If I run the same exact project on another pc it works as intended. It seems the issue is related to some kind of setting of the pc.
from androidlibrary.
It should work in all PCs 💪
Let's print WTF is looking for
from androidlibrary.
@d-moreira new version -> 0.4
- More logs with
debug true
- Some bugfixes 🤞
from androidlibrary.
Hi @efraespada, this is still not working :( (thank you for your effort still!). I managed to get some info from the logs that should be useful:
:app:backupStringResources
source folder not found: path_to_project/src/main/res/
:app:backupStringResources
- values/secrets.xml
backuping file: path_to_project/app/src/main/res/values/secrets.xml
The first log is from the faulty build and the second from a correct build on another machine. We can see that the plugin is trying to find the folder on the wrong path, on the first one. It should look on path_to_project/app/src/main/res/
(so the module name is not being taken into consideration).
Can you look into this?
from androidlibrary.
🤣 🤣 incredible, I can't imagine where is the difference between both PCs for missing module name, but I'm sure It isn't a PC fault.
@d-moreira you are on the right thing. I'll review code again.
Thanks!
from androidlibrary.
@d-moreira check out version 0.5
from androidlibrary.
Hi @efraespada, the problem persists:
:app:mergeTestDebugResources
Module: app
Variant: testDebug
Store: .../.android/debug.keystore
SHA1: ...
Valid until: Saturday, June 10, 2045
:app:backupStringResources
source folder not found: path_to_app/src/main/res/
It seems to recognize the module name but it does not get added to the res
folder path.
from androidlibrary.
Hi @efraespada, any news on this?
from androidlibrary.
@d-moreira check out version 0.6 on plugin:
classpath "com.stringcare:plugin:0.6"
🤞🏼
from androidlibrary.
Hey @efraespada, it's finally working :) thank you for your persistence!
Can you take a look at #25 and release a new version with all these changes?
from androidlibrary.
#25 merged 👌 building version 0.6
on library.
Thank you again @d-moreira!!!
from androidlibrary.
Related Issues (20)
- Strings with the same content doesn't work properly HOT 49
- The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle
- Bug: cannot handle build variants properly HOT 42
- java.lang.NoClassDefFoundError: Could not initialize class components.Stark HOT 23
- java.lang.NoClassDefFoundError: Could not initialize class components.Stark
- compileSdkVersion is not specified HOT 2
- Library Support HOT 2
- Obfuscation library HOT 1
- Gradle crash HOT 12
- Resource not found HOT 3
- Task 'stringcareTestObfuscateDebug' not found in root project HOT 7
- What do you think about https://pypi.org/project/DeStringCare/ ? HOT 2
- Build: failed: Index: 1, Size: 1 HOT 2
- Execution failed for task ':app:generateDebugAssets' HOT 1
- JCenter Deprecation HOT 6
- Wiki update HOT 1
- migrate from AES/ECB/PKCS5Padding to AES/GCM/NoPadding. HOT 1
- Can't open the sample HOT 2
- Manifest merger failed : Attribute application@appComponentFactory
- Is this my version issue
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 androidlibrary.