getting error during project creation using phonegap-2.5.0 - android

i have installed android sdk and downloaded the latest version of phonegap 2.5.0 in fedora 18.
i am trying to create a project using the following command
./create ~/Desktop/android-project com.example.android android_project
am getting the following error.
which: no android in (/sbin:/bin:/usr/sbin:/usr/bin)
An unexpected error occurred: ANDROID_BIN="${ANDROID_BIN:=$( which android )}" exited with 1
need your valuable suggestions.
finally found the answer
After checking my .bash_profile paths, and a bunch of digging, I finally found the cause of the issue. If you open up the create file (phonegap-2.5.0/lib/android/bin/create), there is a line that lists ANDROID_BIN=”${ANDROID_BIN:=$( which android )}”. The “which android” is the cause of the issue (or at least it seemed to be in my case). If you replace this line with the full path to your android tools (as listed below) it should resolve the issue. My final line looked like this:
ANDROID_BIN=/Users/ktyacke/DEV/adt-bundle-mac-x86_64-20130219/sdk/tools/android

The message you have means the phonegap script cannot find the android binary, which is included in the SDK you downloaded. Add the binary's directory, as well as the android tool's directory, to your path defined in ~/.bash_profile or any other location you're initializing the shell's environment variables.

Related

Change Android Studio doclet version

I need to generate the javadoc for a Library in Android Studio.
The problem is that, when I start to create the doc, I see the following logs:
Constructing Javadoc information...
Standard Doclet version 1.8.0_31
Building tree for all the packages and classes...
[...]
1 error
javadoc: error - com.sun.tools.doclets.internal.toolkit.util.DocletAbortException: com.sun.tools.javac.code.Symbol$CompletionFailure: class file for java.lang.FunctionalInterface not found
I don't know exactly what is the problem. I think it is the doclet version (it takes by default 1.8.0_31); I tried to modify it but I did not succeed... any help?
I am using Mac OSX and Android Studio 1.2.2

Can't mach build Fennec for Android

i'm following this tutorial from firefox android source code https://wiki.mozilla.org/Mobile/Fennec/Android
but, the problem i can't ./mach build, ./mach package, ./mach install and i already create .mozconfig file in mozilla-central but it's can't found the file.
like this:
i'm using Ubuntu 14.04.2
thx for help
You probably had an error during the initial "mach bootstrap" step. Your screenshot tells us, that mach can't find the android sdk tools. It's looking for them under ~/.mozbuild/android-sdk-linux/.
One thing you could do is to manually put your sdk under that directory and then retry "mach bootstrap" from the source dir to resolve the remaining dependencies.
Also see these steps for manual setup of the build tools: https://wiki.mozilla.org/Mobile/Fennec/Android/Detailed_build_instructions

CordovaResourceApi import unresolved phonegap

I am using phonegap-2.9.0 with file plugin. When I build project for android platform it creates two packages within the src/ folder:
org.apache.cordova.file
org.apache.cordova.filetransfer
I get below errors within these two packages:
1 - org.apache.cordova.file.FileUtils
Method testSaveLocationExists() from the type DirectoryManager is not visible
Method getFreeDiskSpace() from the type DirectoryManager is not visible
Method testFileExists() from the type DirectoryManager is not visible
2 - org.apache.cordova.filetransfer.FileTransfer
import org.apache.cordova.CordovaResourceApi unresolved
import org.apache.cordova.CordovaResourceApi.OpenForReadResult unresolved
Could someone please tell me what I should do to resolve these?
Thanks.
You have two problems.
1) Version of Phonegap is outdated
2) The way to install a plugin is:
-> phonegap plugin add "urlofplugin" or "/path""
-> phonegap platform add android
-> phonegap prepare
-> phonegap build
sometimes the plugin has a different default installation, the files need to change the platform.
Well, I dont know if I can help you, but I had similar problems. When I installed exactly those two plugins I got an error too. A different one, which I dont perticularly remember, something to do with a missing file that I can easily find in the file manager. Anyway, what helped me was:
I updated to a more recent version, if you are able to I advice for it.
After installing the plugins through cordova cmd api (.nodejs command prompt ... you know what I mean) I was forgetting to build in the api itself. It sounds stupid but I was using wp8 and thus using a template for visual studio. The studio gave me the error, the building process (in cmd) also gave errors, but it was fixed by updating to the newer version.
You need to configure you build path and then add library from external source and select the library then it will resolve or u can make copy and paste cordova library .jar file in your lib folder. then it will remove, if not happen then tell me .......
I am not sure if that will work but first uninstall these plugins using phonegap/cordova CLI and than reinstall it in the root of application folder using the CLI only like this:
phonegap local plugin add <required plugin>
This worked for me after reinstallation.

What could be causing the "OutputPath property is not set for project ProjectName.csproj" error in my MonoDevelop project

On Windows 7 (64 bit) with the Android SDK working perfectly with Eclipse - my first android application, using the first "Hello World" sample (found here - http://docs.xamarin.com/android/getting_started/hello_world - from Xamarin)
fails with the error "the OutputPath property who is not set for project NameProject.csproj".
I have tried re-runing the installation program from Xamarin and this error still occurs.
Could someone please suggest what may be causing this problem?
Thanks a lot.
the exact error:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(9,9):
Error: The OutputPath property is not set for project 'helloWorld3.csproj'.
Please check to make sure that you have specified a valid combination of
Configuration and Platform for this project.
Configuration='Debug'
Platform='BPC'.
This error may also appear if some other project is trying to follow a
project-to-project reference to this project, this project has been
unloaded or is not included in the solution, and the referencing project
does not build using the same or an equivalent Configuration or Platform.
(helloWorld3)
I think we've seen this before. Your system manufacturer installed an environment variable called Platform onto your system. This breaks all msbuild based stuff, since msbuild automatically imports that as $(Platform), conflicting with the real $(Platform) that msbuild uses to compile.
Try removing the environment variable and try again.

Proguard ParseException with Default proguard.cfg on Android

I am about to release an application but, while i was building it using Export Tool of Android SDK in Eclipse, i get the error below.
I didn't change the proguard.cfg.
It is in the root folder of my project.
I only add proguard.config=proguard.cfg to default.properties.
I read the forum and update proguard (just copied the files to the tools folder of Android SDK), but still I doesn't work. I couldn't figure out what the problem is with the 'Projects\Eclipse' ??
If you help me, I will be so glad...
[2011-08-08 02:32:46 - CoolProject] Proguard returned with error code 1. See console
[2011-08-08 02:32:46 - CoolProject] proguard.ParseException: Unknown option 'Projects\Eclipse' in argument number 9
[2011-08-08 02:32:46 - CoolProject] at proguard.ConfigurationParser.parse(ConfigurationParser.java:172)
[2011-08-08 02:32:46 - CoolProject] at proguard.ProGuard.main(ProGuard.java:484)
Yeah that is right, but also I did something that I didn't know :)
My solution was:
I updated to latest Android SDK.
I changed SDK path property under Eclipse: Window > Preferences > Android > SDK Location as something like c:\Progra~1\android-sdk. The Progra~1 can be used for writing Program Files witout spaces. You can use DIR /X command in command prompt on Windows to get no space versions of Paths.
I moved my Eclipse Workspace to a location without spaces like D:\
The changes above didn't enough to solve the problem. I got "Conversion to Dalvik format failed with error 1" error dialog witout any explanation on output console. Then I found that topic and did what that reply says.
Then it worked ;)
I am using Windows 7 Ultimate x86. I hope it works for others too.
Arda.
Your project path probably contains a space. This should be fixed in the latest version of the Android SDK (at least for the Ant build). Otherwise, you should use a path without spaces for the time being.

Categories

Resources