I always use apktool to decompiler the apk file ,and ,you known,some resources's name looks very strange, just like this: <attr name="do" format="string" />. when it's been decompilered.
the question is: when rebuild the folder which contains this resource file ,and then ,error occurs,the error message likes this:"error: invalid symbol: 'do'" or error: invalid symbol: 'if'.
of cause,I have read the source code of apktool ,and I found that these error messages are not throw by apktool,but throws by aapt when executes code: OS.exec(cmd.toArray(new String[0])); in package brut.androlib.res in it's AndroidLibResources.java file. So, I think the google has forgotten to handle these exceptions,because the words "if" and "do" are also the keywords of most popular programming language, and is there anybody has meet the same trouble with me? hope your(s) help.
This is a bug in aapt, which is why you see the error on that line in apktool. Basically symbols like do and if have special meaning. aapt should ignore that and treat them literally, but the validation is a bit too strong.
You may follow the AOSP Bug Report here.
Related
I'm new to programming so I feel there is something simple I'm missing here.
I'm using the latest version of Mac and I've just installed Code::Blocks along with Xcode so I can use the gcc compiler.
I created a new "console application" project and the code for a hello world program shows up.
I built this code and it gave me 0 errors and 0 warnings so I thought it was off to a good start.
But when I go to run this code all I get is the following in my Terminal window:
*/Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/Ryan/Documents/C++ book stuff/SayHello/bin/Debug/SayHello
Ryan-McMullens-iMac:~ Ryan$ /Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/Ryan/Documents/C++ book stuff/SayHello/bin/Debug/SayHello
sh: /Users/Ryan/Documents/C++: No such file or directory
Process returned 127 (0x7F) execution time : 0.003 s
Press ENTER to continue.*
I've checked to make sure its using the gcc compiler. I've also tried creating a C++ directory in my documents folder but that didn't help.
Like I said, I feel like I'm just missing a step somewhere so any help would be really appreciated!
Thanks!
Try avoiding using '+' and spaces in the name of directories.
Many program don't handle escaping of pathnames when running external tools like compiler, linker or when calling the final executable.
Remove spaces from your path. It seems that codeblocks does not quote the paths, so every space will be introducing a new command or parameter. The problem here is this part:
C++ book
because it has a whitespace.
I have been trying to compile a basic tensorRT project on a desktop host -for now the source is literally just the following:
#include <nvinfer.h>
class Logger : nvinfer1::public ILogger
{
} glogger;
Upon running make, though, I receive the following message:
fatal error: nvinfer.h: No such file or directory #include <nvinfer.h>
The error is correct, too - I used locate to try to find it, but there's nothing on my machine that matches. I followed the install instructions for desktop installation of TensorRT 2.1 as described here: https://developer.nvidia.com/nvidia-tensorrt-download
So my question is, does anyone know where nvinfer.h is supposed to be? In other words, am I missing a needed package that contains it, or did I miss something else that's essential?
Small addendum: one thing I noticed is that libgie1 is not installed, and it was not included as a debian with the provided TensorRT download like the other packages such as gie-dev were.
Before using locate, if you recently added new files is a good practice to run sudo updatedb, if the file is on the pc you should see it after.
Anyway googling a bit it looks like the header your looking for is NvInfer.h, caps matters.
I am a beginner to vim and just downloaded the c-support plugin (for C/C++ programming) from the following link: http://www.vim.org/scripts/script.php?script_id=213
As advised in the link, to enable cmake and doxygen, i added the following lines to my _vimrc:
let g:C_UseTool_cmake = 'yes'
let g:C_UseTool_doxygen = 'yes'
However, now when I start up gvim, I get the following error message dialog:
Could not load the tool "cmake" (Vim(let):E117: Unknown function: mmtoolbox#make#Interface)- occurred at C:\Users\Satyendra\Vim\vimfiles\autoload\mmtoolbox\cmake.vim, line 219
My OS is Windows 10. How do I resolve this error?
(Posted on behalf of the OP).
I opened an issue on C-Support's Github page, and the problem was solved.
I am working on a translation application in my high school Computer Science Advanced Studies class. MY school's computers have a CodeBlocks IDE, but no compiler installed. So, I decided to try and find one online that I can use, and Cloud9 seemed like a good prospect. However, when I try to run my program, I get errors such as the following:
g++: error: /home/ubuntu/workspace/English-Spanish: No such file or directory
g++: fatal error: no input files
compilation terminated.
chmod: cannot access ‘/home/ubuntu/workspace/runme’: No such file ordirectory
sh: 1: /home/ubuntu/workspace/runme: not found
I'm not sure where the problem is or how to fix it. Any tips? I'm new to the online IDE scene.
Looks like you didn't add any source code to your project.
I figured out what was wrong. It was a simple mistake, really. My project's filename was "English-Spanish Translator," but spaces are not acceptable for filenames. I renamed it "eng-esp_translate.cpp," and it ran just fine.
I'm new to programming so I feel there is something simple I'm missing here.
I'm using the latest version of Mac and I've just installed Code::Blocks along with Xcode so I can use the gcc compiler.
I created a new "console application" project and the code for a hello world program shows up.
I built this code and it gave me 0 errors and 0 warnings so I thought it was off to a good start.
But when I go to run this code all I get is the following in my Terminal window:
*/Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/Ryan/Documents/C++ book stuff/SayHello/bin/Debug/SayHello
Ryan-McMullens-iMac:~ Ryan$ /Applications/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/Ryan/Documents/C++ book stuff/SayHello/bin/Debug/SayHello
sh: /Users/Ryan/Documents/C++: No such file or directory
Process returned 127 (0x7F) execution time : 0.003 s
Press ENTER to continue.*
I've checked to make sure its using the gcc compiler. I've also tried creating a C++ directory in my documents folder but that didn't help.
Like I said, I feel like I'm just missing a step somewhere so any help would be really appreciated!
Thanks!
Try avoiding using '+' and spaces in the name of directories.
Many program don't handle escaping of pathnames when running external tools like compiler, linker or when calling the final executable.
Remove spaces from your path. It seems that codeblocks does not quote the paths, so every space will be introducing a new command or parameter. The problem here is this part:
C++ book
because it has a whitespace.