I'm new to android. I have some java knowledge (not extensive), and I've done some of the android tutorials.
I'm trying to use osmdroid at the moment, I just want to get the map to display.
I'm using the code from here: Help setting up OSMdroid library for displaying OpenSourceMaps. But when I try to run it (on a virtual device with the correct API level), the console sayes:
[2012-02-03 17:24:06 - osmtest] Failed to install osmtest.apk on device 'emulator-5556!
[2012-02-03 17:24:06 - osmtest] (null)
[2012-02-03 17:24:06 - osmtest] Failed to install osmtest.apk on device 'emulator-5556': EOF
[2012-02-03 17:24:06 - osmtest] com.android.ddmlib.InstallException: EOF
[2012-02-03 17:24:06 - osmtest] Launch canceled!
I still find logcat quite confusing. It sayes: PID 90 tag installd 'Couldn't openat cache: No such file or directory'
What could be the problem here? Something I've done wrong with the avd?
How could I get more useful information from logcat?
Solution I hadn't included slf4j in the build path. :)
So for anyone else with this problem, you download the jar from here: http://www.slf4j.org/android/
and then include it in your build path in the same way you did for osmdroid.jar
(ie. create a lib folder in your project and put the jar there)
I want to mark this question as answered, though I solved this myself in the end.
I didn't have slf4j included in my project. :)
Related
While installing NVidia Android CodeWorks I have received an error at the very end of the installation process saying :
installing compile samples 4.0 failed nvidia
Return Code: 2Compile Samples failed. Please check the /home/user/NVPACK//_installer/compile.log. You can send it to TegraDeveloperPack-Users#nvidia.com if you can not resolve it.
Does anyone know how to solve this problem please
So that other people having the same problem might go on something for I have not found an optimal solution to this problem.
I have managed to solve it by simply copying my version of jdk (which is jdk1.8.0_101) to the specified Nvidia Codeworks folder and renaming to the one missing in the log (...\Nvidia\Codeworks_installer\compile.log - \Nvidia\Codeworks\jdk1.8.0_77" does not exist.) In my case it compiled successfully, however it must be noted that this is not a good solution. Messing around with the environment valuables might be a reasonable place to start otherwise.
If your log file shows:
Error: JAVA_HOME is not defined correctly.
make: *** [antbuild_Basic_debug] Error 1
We cannot execute /usr/bin/java
Makefile.Basic.mk:92: recipe for target 'antbuild_Basic_debug' failed
you can fix it by creating a soft link like this:
sudo ln -s $JAVA_HOME/bin/java /usr/bin/java
I'm trying to create an emulator by choosing emulator-x86.exe from tools folder. Whenever I created I'm getting the below error, and emulator is not getting created. Whats is the issue?
Ant build error=Execute failed: java.io.IOException: Cannot run
program "${emulator.dir}\android.bat" (in directory "ECLIPSE_PATH\configuration\org.eclipse.osgi\bundles\370\1.cp\emulators\android"):CreateProcess error=2, The system cannot find the file specified
Please help me friends
you can follow this tutorial or
do like this
hw.lcd.density=252
sdcard.size=32M
skin.name=NEXUS-ONE
skin.path=platforms/android-10/skins/NEXUS-ONE
hw.cpu.arch=arm
hw.keyboard.lid=no
abi.type=armeabi
hw.keyboard=no
vm.heapSize=24
hw.ramSize=256
image.sysdir.1=platforms/android-10/images/
Programming for android is new for me. Therefore, eclipse is also new. I've been trying to create small things. But every example i find i need to edit in the main.xml.
My problem is, whenever i use that file, i'm getting an error. I don't know what causes it. I don't know how to get rid of it.
I've tried to follow guids on youtube. Following it to the point. Still, getting errors.
Does anyone have an idea to what causes this problem? and more important: how to solve it?
[2012-03-26 12:12:40 - No XML] emulator-5554 disconnected! Cancelling 'cyperia.noXML.NoXMLActivity activity launch'!
[2012-03-26 12:12:52 - No XML] Error in an XML file: aborting build.
[2012-03-26 12:13:00 - No XML] res\layout\main.xml:0: error: Resource entry main is already defined.
[2012-03-26 12:13:00 - No XML] res\layout\main.out.xml:0: Originally defined here.
[2012-03-26 12:13:00 - No XML] C:\Users\Illum\workspace\No XML\res\layout\main.out.xml:1: error: Error parsing XML: no element found
[2012-03-26 12:13:01 - No XML] 'default' is not a best match for any device/locale combination.
[2012-03-26 12:13:01 - No XML] Displaying it with 'Locale Language ___Region __, sw320dp, w320dp, h533dp, Normal Screen, Long screen aspect ratio, Portrait Orientation, Normal, Day time, High Density, Finger-based touchscreen, Soft keyboard, No keyboard, Exposed navigation, Trackball navigation, Screen resolution 800x480, API Level 15' which is compatible, but will actually be displayed with another more specific version of the layout.
[2012-03-26 12:13:02 - No XML] Error in an XML file: aborting build.
This is a long standing issue with Android development with Eclipse. You see this message when you run/debug a project with a .xml file opened as "current document". Eclipse tries to build the xml file instead of the project, thus throw the mysterious error.
A quick workaround would be to navigate to a .java file before you run/debug the project.
You can also select the project from workspace to run/debug it, but it'll take more clicks.
I dealt with this issue for weeks on my main machine, and finally got fed up with it. I installed Eclipse/ADT Plugin on another machine and didn't have the same issue. So this made me think of the most simple solution. Remove and reinstall! I ended up downloading Eclipse again on my main machine and reinstalling the ADT Plugin. The problem no longer exists. Note, I did not uninstall the Android SDK. I left that as is and haven't ran into the same issues yet.
TL;DR Download Eclipse and the plugin again and it should fix the issue.
I get the following errors when I try to compile any Android RenderScript sample code (SDK version 11).
[2012-02-03 16:49:33 - CarouselExample] /Library/android-sdk-macosx/platforms/android-13/renderscript/include/rs_core.rsh:35:33: error: unknown type name 'rs_matrix4x4'
[2012-02-03 16:49:33 - CarouselExample] /Library/android-sdk-macosx/platforms/android-13/renderscript/include/rs_core.rsh:40:33: error: unknown type name 'rs_matrix3x3'
[2012-02-03 16:49:33 - CarouselExample] /Library/android-sdk-macosx/platforms/android-13/renderscript/include/rs_core.rsh:45:33: error: unknown type name 'rs_matrix2x2'
[2012-02-03 16:49:33 - CarouselExample] /Library/android-sdk-macosx/platforms/android-13/renderscript/include/rs_core.rsh:55:27: warning: declaration specifier missing, defaulting to 'int'
[2012-02-03 16:49:33 - CarouselExample] /Library/android-sdk-macosx/platforms/android-13/renderscript/include/rs_core.rsh:88:71: error: unknown type name 'float2'; did you mean 'float'?
...
I've searched around to see if others are having similar issues.
This post Renderscript samples build errors for example mentions that the /renderscript directory in Android-11 to Android-13 needs to be updated with the contents of the /renderscript directory from Android-14+. I have all the SDK versions from 2.1 to 4.0.3 and there's no:
/platforms/android-14/renderscript
directory. I am able to build and run my projects that don't use RenderScript.
Has anyone found a solution for this? Or can someone tell me what I'm doing incorrectly here? I just select File>New>Android Project>Create project from existing sample. If I select any RenderScript samples I'm unable to compile the project.
I've also noticed that the /raw directory (sibling directories of layout, drawable, etc.) initially comes with a file (in my case carousel.bc), but when I compile, this file is deleted - which doesn't seem right to me.
Thanks for you help!
So after some more digging around. I decided to install the Google APIs for the Android-11 SDK and that seemed to fix things. There was still one syntax error I had to fix in the carousel.rs file.
cards[i].cardVisible = (p >= visibleFirst && p < visibleLast)
|| (p <= visibleFirst && p > visibleLast);
The last two parentheses need to be added.
Wish I would have been able to find this out from the Android developer site. Nowhere does it say the "Google API's by Google" need to be downloaded in order to compile RenderScript.
I read alot of posts similar to this topic, but cant solve it anyway.
Everytime I try to export my signed application with the obfuscator enabled, I get the following:
[2011-12-23 13:26:35 - AppName] Proguard returned with error code 1. See console
[2011-12-23 13:26:35 - AppName] proguard.ParseException: Unknown option 'android\AppName\proguard\dump.txt' in argument number 9
[2011-12-23 13:26:35 - AppName] at proguard.ConfigurationParser.parse(ConfigurationParser.java:170)
[2011-12-23 13:26:35 - AppName] at proguard.ProGuard.main(ProGuard.java:491)
I use the Google APIs Version 2.3.3 and the standard configuration and just added the proguard.config=proguard.cfg to the projects.properties.
I use "Progra~1" in the SDK path and tried clean already.
As far as I know, the dump.txt is generated in a successfully run of the obfuscator.
Can someone give me a hint?
It is because of the space in the project folder path. There is a duplicate question here Proguard ParseException with Default proguard.cfg on Android and the answer is step 2,3,4 and 5 of the accepted answer.