Emulator loading worng images - Android Software Development

building a Game for Android ..
i deleted some Images from the Res folder on drawable-hdpi/ldpi/mdpi
refreshed
now when i load the program on the emulator it loads diffrenet images..
Progeam : Eclipse
SDK : Level 8 (2.2)
anyone had this problem b4 thanx for any help
Problem Sloved :
Remove any Images from the Res Directory.
Delete R.java manually move/copy back all the images to the directories
hit refresh in Eclipse ..
R.java will be created again and it works

Another way to accomplish this if you're using Eclipse to develop in is to go to "Project > Clean". This will delete your R.java file and force a rebuild.

Related

resolution problem by java applications

i have a resolution problem by java applications on diamond
i use the orginal rom
R 1.00.25.05
G 52.29.25.12w
D 1.93.00.00
i ‘m installed some java games and it’s worked good ,but the game was so small , the resolution is approximately 90x90 . And so i can’t play the game . And now , How can i change the resolutions.
İ try to down information , but it’s negative
1. Open the java file (*.jar) using Winrar. As an example, we will use Scarface game.
2. Open META-INF folder, drag MANIFEST.MF file to the computer (to the desktop or the other folders).
3. Open MANIFEST.MF with Notepad. To do it, right click on the file and double-click on the notepad icon. You will see strings or programming language inside the file.
4. Add these two strings at the last row:
Htc-MIDlet-Original-Display-Size: xxx,xxx
Htc-MIDlet-Target-Display-Size: xxx,xxx
can anyone help me ,
thanks

ADT8 proguard integration not working

I tried to export signed apps using eclipse and i have the proguard.cfg file in my base project folder but at the end getting build failed.
Same
Some of my projects "Failed to export application" and no more tips.
Is there any logs or other something I can see?
Need help, thanks
Got the same problem here. Looking on the message groups here and the suggestion is to ensure the proguard folder is not under a folder with spaces in it's name. so if you have the sdk installed into "Program Files" then maybe move it to the root of the c drive instead.
*however* even after I did that, I still couldn't get it to compile with proguard enabled...
Managed to get it to work, and confirmed it is all to do with spaces in folder names. If you change your windows temp folder to something else (the default goes under your user accounts in the "Local Settings\Temp" folder which has a space in it. I also had to move my whole workspace which again was under my user account below the "Documents And Settings" folder.
If you feel adventurous - once you try to export a signed app and it fails, you can find a .pro file which you can invoke manually using the proguard.bat and the parameters of @<location to workspace proguard.cfg fle> and @<location to the .pro file> (obviously don't include the < or the > !)
I can't find any issues raised on the android bug tracker, but I'm sure someone will raise it soon.

.9.png help!

I can't drag and drop .9.pngs to the res/drawable folder! I don't know why, but when the file shows up under /drawable, it suddenly pops up with a red x and says that all the other drawables can't be found. What is happening? I'm trying to use a .9.png as a background for a view, but I can't seem to get eclipse to recognize the .9.pngs Thanks in advance
have you tried Project > Clean
?
It's a good first line of defense for weird Eclipse errors
I tried that. It still doesn't work The only way to get it to recognize the image isbto rename it as a PNG instead of a nine-patch
what is the error that eclipse shows?
I had your same error before I used the tool provided for ninepatch building.
If you use the tool, no problem.
You can find it in: ...\android-sdk-windows\tools\draw9patch.bat
It's really easy to use. Google for a tutorial.
Make sure you don't have any other drawable file with the same name as your nine patch or the name doesn't contain uppercase characters.
edit:
or you've just created your nine patch incorrectly
Why do you want it to be called .9.png? Cant you just rename it or is it a best practices kind of thing?
Or is this a type of png? A bit confused...
nvm.. its a stretchable png
From something awesome

[Utility][Tool]baksmali/smali

- What is baksmali/smali?
smali/baksmali is an assembler/disassembler for the dex format used by dalvik, Android's Java VM implementation. The syntax is loosely based on Jasmin's/dedexer's syntax, and supports the full functionality of the dex format (annotations, debug info, line info, etc.)
The names "smali" and "baksmali" are equivalents of "assembler" and "disassembler" respectively.
- Author of the tool
JesusFreke
- Why we need it?
Android apk and jar files will include java classes to execute certain functionality. With baksmali, you will be able to disassemble the java classes into editable form (smalis) so you can do your editing and modding involving java script. Once you done changing, you need to assemble all classes to a readable form for android, i.e, classes.dex and here comes the role of assembler (Smali).
Since we have apk manager, do we still need this tool?
Yes and No!!! Because some apk managers even if they do support jar files but once they decompile smalis, they will remove some lines (.line, .parameter, ...etc) which are in my opinion are useful to locate some codes. So the choice is yours.
- What does this tool do?
Simply it baksmali classes.dex of android apk and jar files into editable form (smalis) to do your changes; then assemble it back (smali).
- Will it affect apk and jar original signature?
No, it will preserve original signature.
- Got problem?
During assembling (smali), you may got error message. You can check log file to locate what is wrong that make the manager stop assembling the file or post the log file for developers to look into it.
- What are the steps to work with this tool?
Run Baksmali_tool.bat file, this will create all needed folders in the first run.
1. Put android apk or jar file in "put-file-here" folder. If Current-file status is set to None, then either you need to set a file in option #3 or you forget putting valid file in "put-file-here" folder.
2. When Current-file status is set to your file, you can disassemble its classes.dex by option #1.
3. Classout folder with name of file project will be created in "project" folder; make your changes there.
4. If finished your changes, assemble classout folder by option #2.
5. If everything is OK, a new file will be created in "finish" folder with tag (Modded_) in its name, push it to your device by option #3 if it was system apk or jar; and if it was non system apk file, install it by option #4.
- Latest stable version
Latest stable baksmali/smali version: 2.2.2 (30.10.2017)
baksmali v. 2.2.2 - Download (bitbucket.org)
smali v. 2.2.2 - Download (bitbucket.org)
baksmali/smaly previous versions - Download (bitbucket.org)
- Latest beta version
Latest beta baksmali/smali version:
- Changelog
baksmali/smali wiki and changelog (github)
- Where can I download latest source code?
You can visit
baksmali/smali source page (github)
and you can download the latest smali and baksmali code versions.
- Special Thanks to XDA Portal Team
Special thanks to XDA Portal Team for featuring this utility
XDA Portal Team
..
hi m8,
thanks for this nice tool
will try it next time I make a new theme
sent from my G-Note
great work majd keep it up
no credit to the author of smali/baksmali? :/
iBotPeaches said:
no credit to the author of smali/baksmali? :/
Click to expand...
Click to collapse
I think the authers are these guys ([email protected], [email protected], JesusFr.. @gmail.com) from project page.. aren't they??? if so I will update OP
majdinj said:
I think the authers are these guys ([email protected], [email protected], JesusFr.. @gmail.com) from project page.. aren't they??? if so I will update OP
Click to expand...
Click to collapse
Yes, thats the same person. I'd just put JesusFreke, as thats his username.
Version 1.1 is online
version 1.2 is online
some bugs fixed
Grate dev, Great tool...tnx majdini:fingers-crossed:
What a great idea to simplify life ^^.
Thanks majdinj.
majdinj said:
Backsmali / Smali Manager​
What is Backsmali / Smali?
smali/baksmali is an assembler/disassembler for the dex format used by dalvik, Android's Java VM implementation. The syntax is loosely based on Jasmin's/dedexer's syntax, and supports the full functionality of the dex format (annotations, debug info, line info, etc.)
The names "smali" and "baksmali" are equivalents of "assembler" and "disassembler" respectively.
Why we need it?
Android apk and jar files will include java classes to execute certain functionality. With backsmali, you will be able to disassemble the java classes into editable form (smalis) so you can do your editing and modding involving java script. Once you done changing, you need to assemble all classes to a readable form for android, i.e, classes.dex and here comes the role of assembler (Smali).
Since we have apk manager, do we still need this tool?
Yes and No!!! Because some apk managers even if they do support jar files but once they decompile smalis, they will remove some lines (.line, .parameter, ...etc) which are in my opinion are useful to locate some codes. So the choice is yours.
What does this tool do?
Simply it backsmali classes.dex of android apk and jar files into editable form (smalis) to do your changes; then assemble it back (smali).
Will it affect apk and jar original signature?
No, it will preserve original signature.
Got problem?
During assembling (smali), you may got error message. You can check log file to locate what is wrong that make the manager stop assembling the file or post the log file for developers to look into it.
What are the steps to work with this manager?
Run Backsmali_tool.bat file, this will create all needed folders in the first run..
1. Put android apk or jar file in "put-file-here" folder. If Current-file status is set to None, then either you need to set a file in option #3 or you forget putting valid file in "put-file-here" folder.
2. When Current-file status is set to your file, you can disassemble its classes.dex by option #1.
3. Classout folder with name of file project will be created in "project" folder; make your changes there.
4. If finished your changes, assemble classout folder by option #2.
5. If everything is OK, a new file will be created in "finish" folder with tag (Modded_) in its name, just rename it to its original name and push it to your device; don't forget to fix permissions as well.
If backsmali and smali code are outdated, what to do?
Just visit codes owner page, and download the latest smali and backsmali code versions and put them in "tools" folder (make sure to rename them to baksmali and smali without version number)
Future development?
Feel free to report any bugs or suggestion to improve upcoming releases :good:
Download
- Backsmali-Manager_v1.2 @ 11/June/2013 (The most recent one)
- Backsmali-Manager_v1.1 @ 7/June/2013 (old)
- Backsmali-Manager_v1 @ 6/June/2013 (old)
Change-log:
@ 11/June/2013 (v1.2):
- Fixed bug of file path in Read Log option.
- Fixed number 10 file that was not shown in Set Current-file option.
@ 7/June/2013 (v1.1):
- Deleting the folder and file in project and finish folder of same project name before backsmali or smali (no more overlapping :fingers-crossed.
- Added Read log file functionality in the main menu.
- Ability to open classout folder after backsmali.
- Ability to open finish folder after smali.
- Ability to renamed finished modded file to its original name.
- Neat smali and compression processing (i.e, hidden processing ).
- Fixed set Current-file option to visualize only apk and jar files.
@ 6/June/2013 (v1.0):
- First release of Backsmali / smali manager
Click to expand...
Click to collapse
i don't know how to start editing this smali file
badagila said:
i don't know how to start editing this smali file
Click to expand...
Click to collapse
Editing smali means to modify your jar or apk file to do certain new function, check the second thread in my signature in OP... you will find a lot editing tutorials of smalis of some android apps :laugh:
majdinj said:
Editing smali means to modify your jar or apk file to do certain new function, check the second thread in my signature in OP... you will find a lot editing tutorials of smalis of some android apps :laugh:
Click to expand...
Click to collapse
ok dude thanks
Hi, your work is featured here: http://ajqi.com/baksmali-smali-manager-windows-tool/
Keep it up!
VERY NICE!
Good Work..
I dont know much about smali backsmali.. but one confusion..
Is this tool also applicable if the files (apks or jars) we want to modify are odexed?
OJ said:
Good Work..
I dont know much about smali backsmali.. but one confusion..
Is this tool also applicable if the files (apks or jars) we want to modify are odexed?
Click to expand...
Click to collapse
No, actually classes.dex are made from the odex files.
If files are odexed, then there will be no classes.dex in apks or jar files. That's why it won't be applicable then
Version 1.3 is online
Change log:
- Added adb push finished file to device system partition (for system files).
- Ability to choose whether to reboot device after pushing files to device.
- Added adb install finished apk (for non-system files).
- Adjustable Java heap memory size.
- Adjustable finished file compression level.
- Updated Smali and Backsmali codes (date 15/6/2013).
@ 23/June/2013 (v1.4):
- Added Pull apk or jar From Android Device to the main menu.
- Added zipaligning process during Smali (better RAM management).
- Fixed apk installing process (added signing process step for installing apk process).
- Added direct link to this xda page in update option.
- More script polishing...
@ 29/June/2013 (v1.5-FINAL):
- Fixed adb remount bug for some ROMs in push option.
- Baksmali argument is updated; now you can choose whether to baksmali with x argument (retain .line, .parameter, .prologue, and .local) or b argument (remove .line, .parameter, .prologue, and .local).
Hi,
i've XP&Backsmali / Smali Manager v1.5 and i want baksmali framework.jar but i got error message(attachment)
I think wrong is slash (should be a backslash)
the same error is after i select 1(baksmali*)and then x and Y or
--------------------------------------------------------------and then b and Y
*baksmali or backsmali?

ActionBarSherlock & ViewPagerIndicator

Hi.
I am trying to use ViewPagerIndicator & ActionBarSherlock in one package. But I get a famous error :
"R can't be resolved to a type."
To fix it I have done the following tricks :
1- I have copied the android-support-v4.jar from my project to ABS & VPI's libs folder.
2- I have deleted the jar from my project.
But yet it's not working & has the problems.
Can anybody help me ?
Thanks in advanced.
torpedo mohammadi said:
Hi.
I am trying to use ViewPagerIndicator & ActionBarSherlock in one package. But I get a famous error :
"R can't be resolved to a type."
To fix it I have done the following tricks :
1- I have copied the android-support-v4.jar from my project to ABS & VPI's libs folder.
2- I have deleted the jar from my project.
But yet it's not working & has the problems.
Can anybody help me ?
Thanks in advanced.
Click to expand...
Click to collapse
If you are developing with eclipse, go to project properties, -> android , notice the bottom section there something like add library, add the ABS bin folder there. Thus it creates a dependancy to another library project instead of copying jar. Was it setup that way in ur project? As it needs reference to the R file and Res folder in those library (ABS).
torpedo mohammadi said:
Hi.
I am trying to use ViewPagerIndicator & ActionBarSherlock in one package. But I get a famous error :
"R can't be resolved to a type."
To fix it I have done the following tricks :
1- I have copied the android-support-v4.jar from my project to ABS & VPI's libs folder.
2- I have deleted the jar from my project.
But yet it's not working & has the problems.
Can anybody help me ?
Thanks in advanced.
Click to expand...
Click to collapse
You got an "R can't be resolved to a type." error ... SO ... all you have to do is first check if any of your XML Files have any errors in them .. And then do a Make Clean ... The error should now disappear ... :fingers-crossed:
Eclipse or Android Studio? If Eclipse, do you have Build-Tools installed? If Android Studio, which version are you using?
Sent from my GT-S5830M using Tapatalk 2
I have done all these. (Using last adt bundle)
But again android.support.v4.ViewPager can't be solved.
Can anybody help me ?
Thanks.

Categories

Resources