w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Is it possible to share library projects between projects when using Android Studio and gradle?
Couldn't you use git with submodules? e.g. In your .gitmodules file, you may add this: [submodule "volley"] path = volley url = https://path/to/volley/repository You can set the url to Volley's official repository, or to your own in-house version of volley. Other projects can be setup the same way and point to the same volley repository. I think this way, other users can call git clone and all the dependent projects will be downloaded within the main project folder and they don't have to worry about downloading the library projects separately. For Volley though, I would just compile it into a JAR file and stick it into the /libs folder of the main project. That is, if you don't need to modify its source. [Update] For library projects that you don't need to modify its source, you ca

Categories : Android

"java: package org.apache.cordova does not exist" when compliling Cordova in Android Studio
Android Studio uses Gradle project layout. This means main java files should be in /src/main/java. If Cordova generates different structure (it looks like it is old Ant structure) you need to add its source folders to build.gradle android { ... sourceSets { main { java { include 'some/wanted/package/**' include 'another/wanted/package/**' exclude 'some/unwanted/package/**' } } } } Here is where the file sits:

Categories : Java

How to develop gps plugin in java through cordova exec
I got sometimes this error too. Try to call this function like this: var cordovaRef = window.PhoneGap || window.Cordova || window.cordova; cordovaRef.exec( callback, function(err) { callback('ERROR'); }, 'gpsPlugin', 'showCurrentLocation' []);

Categories : Java

PhoneGap Facebook Plugin - Android - import org.apache.cordova.api.Plugin;
just for clarification if u want to add facebook plugin with the earlier version of Phonegap, try to implement this link : https://github.com/phonegap/phonegap-facebook-plugin and if u want to develop plugin with the newer version of Phonegap (which is known as Cordova), try to implement this link : https://github.com/Raffaello/phonegap-facebook-plugin Still u get any error please post you error log....

Categories : Java

which plugin i want to dowlod for develop Android and Windows Phone apps
For develop in android you can use Eclipse IDE and install the plugin. See this: http://developer.android.com/sdk/installing/installing-adt.html For the windows phone you can continue using visual studio. Download windows phone 8 sdk here: http://dev.windowsphone.com/en-us/downloadsdk

Categories : Android

Android Studio Error: "You must install the Android Support Repository though the SDK Manager"
you must manualy run SDK Manager folder android-studio/sdk/tools search android or android-sdk new Support Repository must be already selected, and need only click "install" button

Categories : Android

Can Cordova Plugman be used to install plugins into IBM Worklight projects?
First thing is to read about Cordova support in Worklight: http://www.ibm.com/developerworks/mobile/worklight/getting-started.html#cordova A Worklight project is not a Cordova project A plug-in is: added by referencing it in config.xml For iOS, the implementation files must be added in Xcode; placing them in the Worklight project in Eclipse and building it will not make the plug-in part of the generated Xcode project (to be later built in Xcode...) For Android and Windows Phone, the implementation files can be placed in Eclipse I believe the support for BlackBerry 10 in this category is minimal. Not sure

Categories : Cordova

Android Studio: Plugin with id 'android-library' not found
Instruct Gradle to download Android plugin from Maven Central repository. You do it by pasting the following code at the beginning of the Gradle build file: buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:1.1.1' } } Replace version string 1.0.+ with the latest version. Released versions of Gradle plugin can be found in official Maven Repository or on MVNRepository artifact search.

Categories : Gradle

Maven Android Plugin And Library Projects
Eclipse's configuration ought to be changed in order to use the installed Maven, and its repository and settings instead of the embedded one. Go to "Window -> Preferences -> Maven -> Installations", add externally installed Maven to the list, and select it. After this, right click on the Maven project -> Maven -> Update Project. Click "Select All" (right side) and make sure all options at the bottom of the dialog box are selected except "Offline". This should refresh your workspace with dependencies from your local Maven's repository.

Categories : Android

PhoneGap cordova plugin for Android
Change NotificationMessenger.prototype.notify() in statusbarnotification.js to this: /** * @param tag Tag of the notification * @param title Title of the notification * @param body Body of the notification * @deprecated Use the W3C standard window.Notification API instead. */ NotificationMessenger.prototype.notify = function(tag, title, body, flag) { if (window.Notification) { this.activeNotification = new window.Notification(title, { body: body, flag: flag, tag: tag }); } } Then you can call: window.plugins.statusBarNotification.notify("11", "Put your title here", "Put your message here");

Categories : Cordova

Android Studio is not using gradle to build my projects
If you import an existing project with no gradle configuration, Android Studio will use the old build system. If you want to use gradle, you should follow the instructions in the documentation : http://developer.android.com/sdk/installing/migrate.html

Categories : Android

Using IntelliJ with Android plugin, rather than using Android Studio
I've been using IntelliJ IDEA 12 for Android projects for a long time. Android studio has a lot of beneficial additional Android integration, such as: Inline Lint API checks Drawable and string previews Better layout editor Built in Gradle support Better DDMS integration But you can certainly just use the community edition of IntelliJ 12 for Android projects, and for production projects, I would say it's preferable at this time until Android Studio stabilizes. Also, I believe IntelliJ 13 will essentially include all of the Android functionality that Android Studio does, from what I've heard.

Categories : Android

videoPlayer plugin not working on cordova 2.7.0 - Android
The issue is with readme, instead of updating plugins.xml you need to update config.xml. phonegap Class not found at file:///android_asset/www/cordova-2.0.0.js:938

Categories : Cordova

Collaborating Android Studio projects on multiple machines
In general, you should not add files to version control that may have local settings. You should also mark these files to be ignored in .gitignore to prevent other developers from accidentally adding them to version control. In my current projects I ignore the following files generated by Android Studio: *.iml *.ipr *.iws .idea/ However, I don't have the same situation as yours, because I'm not using any external libraries for now. If that is not an option for you for some reason, you could try one of these workarounds: Add the external libraries to version control. Normally I'm against adding binaries to version control, but in this case it might be acceptable, especially if there are only a few such files. Use symbolic links: the library references are standardized in the project,

Categories : GIT

How to Clear Recent Projects List in Android Studio?
All at once? No, but you can hover your mouse over the project name e hit Delete on your keyboard. UPDATE I don't know if it existed or was added in the lastests version, but open any project and go to File > Reopen and select Clear List. Click OK on the confirmation dialog and next time you open AS the Recent Projects list should be blank.

Categories : Android

Pass some data from cordova plugin to activity in android
On CordovaPlugin: Context context=this.cordova.getActivity().getApplicationContext(); //or Context context=cordova.getActivity().getApplicationContext(); Intent intent=new Intent(context,Next_Activity.class); intent.putExtra("Keyid", "Yourdata"); context.startActivity(intent); //or cordova.getActivity().startActivity(intent); On you next activity @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.intent); Intent intent = getIntent(); //If your extra data is represented as strings, then you can use intent.getStringExtra(String name) method. In your case: String id

Categories : Android

Cordova facebook connect plugin fail on login in android
Make sure that your Facebook app is not set to sandbox mode. The Sandbox Mode should be selected as Disabled. As per the documentation, if this is enabled, only developers can access the app. Hence, testing on a real device may through an error.

Categories : Android

Library projects in Android Studio only work if nested in the project tree?
Every step are here : How do I add a library project to the Android Studio? If you want to more about gradle see the Google I/O conference by Xavier Ducrohet on youtube : http://www.youtube.com/watch?v=LCJAgPkpmR0

Categories : Android

Change default save location of projects (or Workspace ) in Android Studio
It's simpler: if you create a project at, say /home/USER/Projects/AndroidStudio/MyApplication from there on all new projects will default to /home/USER/Projects/AndroidStudio. Android Studio: Default project directory

Categories : Android

Is there a way to convert an Eclipse, 1 library + 2 application projects into an Android Studio, 2 build variants
You should use Eclipse Export tool to generate gradle files for you. then you can easily export it in Android Studio

Categories : Android

Manually install Device plugin (and others) into cordova 3.0
I ran into the same issue. In fact, the plugin system has not changed much. I added the date picker plugin for Android just now : add classes (.m .h for iphone, .java for android) add js files where you want add link to js files in your index.html edit config.xml (path depends on which OS you used) : Instead of adding plugins between plugins tags : <plugin name="DatePickerPlugin" value="com.phonegap.plugins.DatePickerPlugin"/> You will add a feature (what a revolution !) like this : <feature name="DatePickerPlugin" > <param name="android-package" value="com.phonegap.plugins.DatePickerPlugin"/> </feature> And that is it ! If you are not sure about the OS syntax for param name, you can add a default cordova plugin using a command as this one : cordov

Categories : Android

how to install the android studio ? iam getting error like this
You can encounter this error sometimes when updating from Android Studio 0.1.x to 0.2.x. If you've encountered the error in this way, they describe the problem and solution here: http://developer.android.com/sdk/installing/studio.html In short, I might try a fresh install.

Categories : Android

Install ActionBarSherlock 4.4 in Android Studio
I successfully added it as aar dependency, no need to download and compile any sources. Open Tools -> Android -> SDK Manager and install latest platform and build tools 18.0.1. Create new project with Android Studio for Android 2.1 (API level 7) and replace build.gradle of subproject (not the top one) with the one below. Complete minimal build.gradle, it needs Android Build Tools version 18: buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' } } apply plugin: 'android' repositories { mavenCentral() } android { compileSdkVersion 18 buildToolsVersion "18.0.1" defaultConfig { minSdkVersion 7 targetSdkVersion 18 } } dependencies { compile 'com.actionbarsh

Categories : Android

Titanium Studio cannot install Android SDK
As described in the error message, Android SDK API 18 is not installed on your system. However, this package isn't present in your list. You may need to update Android SDK Tools first.

Categories : Android

How to install a apk on emulator in Android Studio?
You can install .apk files to emulator regardless of what you are using (Eclipse or Android Studio) here's what I always do: (For full beginners) 1- Run the emulator, and wait until it's completely started. 2- Go to your sdk installation folder then go to platform-tools (you should see an executable called adb.exe) 3- create a new file and call it run.bat, edit the file with notepad and write CMD in it and save it. 4- copy your desired apk to the same folder 5- now open run.bat and write adb install "your_apk_file.apk" 6- wait until the installation is complete 7- voila your apk is installed to your emulator. Note: to re-install the application if it already existe use adb install -r "your_apk_file.apk" sorry for the detailed instruction as I said for full beginners Hope this

Categories : Android

How to Install SQLIte Plugin in Android + iOS in Phonegap
Please change your code line to var db = window.openDatabase("test.db", "1.0", "test", 20000); instead of var db = window.sqlitePlugin.openDatabase("test.db", "1.0", "test", 20000);

Categories : Cordova

Cannot install Android Studio under Windows 8 64bit
I do not know why, but installing "Java for Chrome" (.exe) made everything work. This is awkward as I did have Java (same version 1.7.u25) installed and used before with all the environment variables set.

Categories : Android

Gradle Maven plugin "install" task does not work with Android library project
I just solved the issue by defining an upload archive as described here: Gradle documentation 52.6.2. Deploying to a Maven repository uploadArchives { repositories { mavenDeployer { repository(url: "file://${System.env.HOME}/.m2/repository/") } } } calling gradle uploadArchives deploys the artefact to the (in my case local) Maven repo. I havn't found a simple and more flexible way to specify the local repo's url with e.g. mavenLocal() yet but the above suits my needs.

Categories : Java

Android: How can I open an older android project in Android Studio?
Look at this links. How do I open my existing Eclipse projects in Android Studio? http://developer.android.com/sdk/installing/migrate.html

Categories : Android

Android Studio - Build an Android project with Android library which depends on another Android Library
The manifest files for the library must currently have a <application /> node, even if it's empty. It's a restriction we'll remove at some point but for now, just add it.

Categories : Android

Codeigniter to develop Android App
If you want to create an android app same as your website without recoding the answer is no. But if you only want display your website in your application yes, you can use webview to display the website but I don't think that'll be a good user experience for the user of your app. But hey why you don't want recode? coding is fun isn't it? :p

Categories : Android

Can I develop OpenCV for Android without NDK?
ANSWER so finally figured it out! You need the NDK for any native application bits, from what I have gathered this is recommended as the native camera features work faster and are more accurate, mainly because opencv was originally developed in c/c++. Installing and setting up the NDK is really straight forward. I managed to do it in around 20 seconds after reading this link =) NOTE: I am using intellij and ubuntu and it worked (although it says 4 eclipse works for intellij too!) How to install and Build NDK with eclipse?

Categories : Opencv

Can I develop Android widgets using Sencha?
Sencha uses HTML, JavaScript and CSS to build UI apps. It s not tied to native Android, iOS or other mobile platform components. This is what makes it such an attractive proposition, you don't have to port your code to each device platform.

Categories : Extjs

Android : Error to install Google play services in android emulator?
This is a hack from one of the posts on SO that I used and had setup on my machine. Dont have the link right now, if someone could post that please, this is just a dump from back then that I had copied. 1.) Create a new emulator 2.) For device choose "5.1'' WVGA (480 x 800: mdpi)", Target choose "Android 4.1.2 - API level 16", "CPU/ABI" choose "ARM" and The rest choose defaults 3.) Start the emulator install com.android.vending-1.apk and com.google.android.gms-1.apk via ADB install command Voila! It worked for me. Last I checked this was only possible otherwise officialy on devices. But that is 2012 December knowledge, I havent checked again

Categories : Android

How to develop custom status bar in android JellyBean 4.2.2
Here is what I could find: a "How to Make a Custom Status Bar" site that has a step by step (looks promising) However it looks like you may need to alter the firmware this link claims the only way to override the status bar is to change the android source code I was also able to find this a SO question that uses the full screen feature and then put a new psuedo status bar on top creating the illusion of an altered status bar Still, there are already apps on the market that do this as you mentioned yourself. So, there is an answer out there, however IMHO it may not be worth the effort to implement unless it is integral to your app (however, I would not advise you to pursue making a copycat app unless it is for personal improvement/practice)

Categories : Java

Use Sublime Text 2 to develop Phonegap applications for Android
While I agree with Insane Coder that you should stick with supported IDEs to develop for Android, according to this link and existing Sublime Text 2 Ant support, you could build and develop your android project with this IDE (It will just take some time to set it all up... as opposed to using a supported IDE like IntelliJ or Eclipse). Using PackageControl, look for "Ant". That will install syntax highlighting for Ant. Another plugin that enables the build command (ctrl+b) to work for Ant files, "Super Ant". You should be able to code for android in sublime text 2 with those installed. On another note... Do you use windows? The Andrew project you link to, seems to have Windows compatibility issues. Apparently related to locating the "SDK" (he says sdk in Andrew's github page but, probably

Categories : Android

cordova platform add android gives the error: "Error: The provided path is not an Android project."
I had the same problem which I solved using the -d flag to show debug output cordova -d platform add android My debug output showed that I need to set a JAVA_HOME environment variable and then I needed to add JAVA and ANT to the path.

Categories : Android

Android Studio 0.2.2 + ActionBarSherlock setttings: Could not find class 'android.support.v4.app.FragmentActivity'
As you requested my settings to be shared, I here post my project settings window. Hope that you can help. 1. ActionBarSherlock project. Note that only android-support-v4 is checked to be exported. 2. My personal project settings windows. Nothing special but only ActionBarSherlock project is referenced.

Categories : Android

Maven repository and "Android support library", revision 18 for Android Studio 0.2.x
Install fresh Android Studio 0.2.x. Upgrade from pre 0.2 doesn't work as mentioned here http://developer.android.com/sdk/installing/studio.html#Updating Reason is that new Android Studio is shipped with maven repo for serving support libraries. Alternatively edit build.gradle and replace compile 'com.android.support:support-v4:13.0.+' with compile files('/libs/android-support-v4.jar') then copy support jar to libs folder.

Categories : Android

Automatically versioning Android project from git describe with Android Studio/Gradle
After some further reading and several false starts, I ended up with this, added to the bottom of build.gradle in the project directory (that is, MyAppProject/MyApp/build.gradle, not MyAppProject/build.gradle -- confusing, I know, but the former directory is projectDir in Gradle so that's how I refer to it here). It depends on no external utilities other than Git, which is assumed to be in the path, so it should work on any OS (even though I used forward slashes in the paths, they get converted to backslashes on Windows). It could probably stand to be improved, I'm sure, as my understanding of Gradle is pretty rudimentary and my Groovy may not be very idiomatic (though that in particular is less of a concern). I have a feeling that my approach is suboptimal because it involves generatin

Categories : Android



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.