Troubleshooting the stated error project? - Android Software Development

Sorry rather a newbie learning android studio where I downloaded a project http://www.androidhive.info/2014/12/android-uploading-camera-image-video-to-server-with-progress-bar/ to get my hands dirty with coding a camera app to upload to a server. Can anybody get it to work after downloading it? Because somehow I couldn't get it to work after I tried compiling it, with a error for this statement in the MainActivity.java file.
Code:
getActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor(getResources().getString(R.color.action_bar))));
I've tried changing the code statement to this but still not working either:
Code:
getActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor(ContextCompat.getColor(this,R.color.action_bar))));
Someone please help! Thank in advance

imso said:
Sorry rather a newbie learning android studio where I downloaded a project http://www.androidhive.info/2014/12/android-uploading-camera-image-video-to-server-with-progress-bar/ to get my hands dirty with coding a camera app to upload to a server. Can anybody get it to work after downloading it? Because somehow I couldn't get it to work after I tried compiling it, with a error for this statement in the MainActivity.java file.
Code:
getActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor(getResources().getString(R.color.action_bar))));
I've tried changing the code statement to this but still not working either:
Code:
getActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor(ContextCompat.getColor(this,R.color.action_bar))));
Someone please help! Thank in advance
Click to expand...
Click to collapse
It would help if you specified what error are you getting

Related

apk CODE editing

I'm starting to develop new apps and I needed to learn to do a specific thing - and there are apps for the stuff I want..
is it possible to look at the code of an apk file and then write own by using the apk as a guideline? kind of like reverse engineering an application???
thanks in advance.
I don't think u can directly reach to the original java code through the apk.
I've read about "disassembling" though.
Try googling "baksmali" for more info on a pretty disassembler project.
Ofc it would be better if you tried to ask the original creator for some help. Easier for you and better for the "development idea"

[app]JAVA solution for phones with no JAVA

after all my hard work and no one helpong me i have done the update.zip to enable java on any phone most likely tried it on my HTC Desire with RCMix HD Rom that doesnt have the JAVA app in it
u can download from the attachments...
Sure guys u need RoOt
NOTE: DO Nandroid & Flash on your own Risk... but most important its working please test
Thanks too TheGhost1233 giving me one hint
if u like this just give me stars thanks
tnx bro ... that's amazing
JAVA is important
5 stars ..
l3zawi said:
tnx bro ... that's amazing
JAVA is important
5 stars ..
Click to expand...
Click to collapse
How is java important, android is based on java, an .apk is just a modified .jar and there are tools to change a .jar into an .apk so a jre or java vm isnt required
Nice. Can this use for website that require java applet security?
Sent from my HTC Desire using XDA App
java is very important for me thanks bro....
coolexe said:
java is very important for me thanks bro....
Click to expand...
Click to collapse
you r welcome
l3zawi said:
tnx bro ... that's amazing
JAVA is important
5 stars ..
Click to expand...
Click to collapse
AndroHero said:
How is java important, android is based on java, an .apk is just a modified .jar and there are tools to change a .jar into an .apk so a jre or java vm isnt required
Click to expand...
Click to collapse
this app can let u use any file that has a .jar or .jad ending and it has lots of usefull apps that u can u
najar360 said:
Nice. Can this use for website that require java applet security?
Sent from my HTC Desire using XDA App
Click to expand...
Click to collapse
i dont knw about that give it a try and tell me
overall this app is to make it easy to use java files so have fun and plz report if there is anything wrong i can do
thanks for this
but it doesn't seem to integrate into the browser.. i flashed it and went to java.com and it couldn't confirm that i have java installed. not sure if this was your goal, but it would have been awesome
omniwolf said:
thanks for this
but it doesn't seem to integrate into the browser.. i flashed it and went to java.com and it couldn't confirm that i have java installed. not sure if this was your goal, but it would have been awesome
Click to expand...
Click to collapse
:s that is something else this app is just to let JAVA files or apps work on the phone
Why is there no java.apk in this zip file? Also, recovery throws up an error: Unable to find "system/customize/MNS/52099.xml" in Manifest file or something like that when tried to flash this zip..
I get an error for a missing file system/customize/MNS/52099.xml and then it says verification failed... anyone know how to fix this
ashkool said:
Why is there no java.apk in this zip file? Also, recovery throws up an error: Unable to find "system/customize/MNS/52099.xml" in Manifest file or something like that when tried to flash this zip..
Click to expand...
Click to collapse
There is ... in sdext and then app_s
New update
K so i made this updated Java update that should work on everyone else's thats giving the error that it gave me so test it out and always do nandroid backups!!
how exactly do i use that once flashed? i have a .jad file but it wont work...the only way i've got it work is with foundation profile midp installed, and that is very ugly. not even sure about security since i want to use it for m-banking?
works on CM RC2 ?
Sorry , Mistakenly Posted.

[Q] .xml files

Ok I'm posting this in hope that a developer will answer.
I have been trying to edit .xml files on the droid x. I'm running linux (who runs windows anyway) I have experience in c++ and scripting , but non in themeing.
I have download a bunch of xml file editors. The problem is that every time I open one with the editor I get a error saying " coding not supported ". What ia the deal here and why? Does anyone have any suggestions or ideas why?
Thank you xda
The .xml files need to be decompiled first. Otherwise, they are unreadable. The only way I know off is to decompile the entire apk file with apk manager or aapt.
Note that you have to recompile the apk (xml) before putting it back on your phone.
GL
Thank you makes sense.
B-dub25 said:
Ok I'm posting this in hope that a developer will answer.
I have been trying to edit .xml files on the droid x. I'm running linux (who runs windows anyway) I have experience in c++ and scripting , but non in themeing.
I have download a bunch of xml file editors. The problem is that every time I open one with the editor I get a error saying " coding not supported ". What ia the deal here and why? Does anyone have any suggestions or ideas why?
Thank you xda
Click to expand...
Click to collapse
Still working with this myself. You need to look on google code for smali/baksmaling, as this is what is used to compress/decompress the xml files.
Thank you systemadmin that's what I thought I had to do, decompile the. Xml file ,but just didn't now how thank you for your reply.
No worries. I have been working on trying to theme and what not myself, and it seems pretty complex at the beginning. Im trying to get some tips from like bignadad, acidbath, and some of the other big developers out here, but they are usually pretty busy and I haven't had much luck. If you start making some progress, send me a PM and share the love =)
Sent from my DROIDX using XDA App

[Q] R.Java Not updating automatically

Hello all
I'm new to the forums. And really dont know whether i'm posting in the correct section. So correct me if i'm mistaken.
I'm having an issue that i've failed to resolve. I'm trying to develop an alarm clock. But the R.Java file doenst update itslef. Only the drawables get added to it but everything else isn't updated eg the string resources.
I've tried making the project again and den copying all the files to it but that hasn't really worked several times now!
Please help me out of this
Regards
Master
bump bump
JDLMaster said:
Hello all
I'm new to the forums. And really dont know whether i'm posting in the correct section. So correct me if i'm mistaken.
I'm having an issue that i've failed to resolve. I'm trying to develop an alarm clock. But the R.Java file doenst update itslef. Only the drawables get added to it but everything else isn't updated eg the string resources.
I've tried making the project again and den copying all the files to it but that hasn't really worked several times now!
Please help me out of this
Regards
Master
Click to expand...
Click to collapse
what ide are you using to develop?
My guess is that you have errors in your project that are preventing it from building. Check the console
Search the forum for R.java. There is another thread (or more) about this.
It is a known issue/problem with Eclipse.
killersnowman said:
what ide are you using to develop?
Click to expand...
Click to collapse
Eclipse IDE

NEED help: Trying to make oreo systemui color light

hey guys
Im trying to change systemui color in android oreo to the default color by google which is light/white
im using this thread for guidance:
https://forum.xda-developers.com/cr...-light-color-systemui-xperia-oreo-fw-t3715197
but Im not able to recompile framework-res.apk
im getting some errors and it dosent matter if i make changes or not
im not a pro in terms of compiling/recompiling
if anyone was successful please help me out!
thanks!
btw i have posted the errors in that topic
Kianush said:
hey guys
Im trying to change systemui color in android oreo to the default color by google which is light/white
im using this thread for guidance:
https://forum.xda-developers.com/cr...-light-color-systemui-xperia-oreo-fw-t3715197
but Im not able to recompile framework-res.apk
im getting some errors and it dosent matter if i make changes or not
im not a pro in terms of compiling/recompiling
if anyone was successful please help me out!
thanks!
btw i have posted the errors in that topic
Click to expand...
Click to collapse
I encountered a similar problem where I couldn't recompile. It was because the referenced package I was referencing (in framework-res.apk) was missing from the compile command. I had to use the -I command to reference the framework-res.apk package for compilation.
Code:
aapt package -S res/ -M AndroidManifest.xml -f -v -F framework-res-overlay.apk -I ~/Documents/framework-res-overlay/framework-res.apk
Additional resources I used:
-Framework Hacking General
Damn i dont know anything about this stuff...i hope i can do this
Thank you
Kianush said:
Damn i dont know anything about this stuff...i hope i can do this
Thank you
Click to expand...
Click to collapse
It certainly takes a little time investment. Make sure you download the android SDK. That will give you the ability to download the build tools. I personally haven't had luck with apktool for making overlays. Anecdotal, I know but the official dev tools are just as easy to use once you understand how to use them properly.

Categories

Resources