Thursday, January 12, 2017

CORS is if your trying to access from one domain - another domain.

XMLHttpRequest cannot load https://www.test.com;.
 No 'Access-Control-Allow-Origin' header is present
 on the requested resource. Origin 'http://127.0.0.1:55427'
 is therefore not allowed access.
CORS is if your trying to access from one domain  - another domain.
Try withJSONP. JSONP should work , because it  uses the GET method.
Try this
var url = "https://test.com";
$http({
    method: 'JSONP',
    url: url
}).
success(function(status) {
    //success
}).
error(function(status) {
    //fails
});

Tuesday, December 20, 2016

Error while launching the activity Android Studio

Hi ,
I am working with android studio with multiple applications, i got an issue after changing the package name and running the application through android studio. I could not able to run.....

I restarted the studio, but not resolved.

I followed these steps.

1. First remove the directory
~/.gradle/caches/ I am using mac, so open terminal,

rm -rf ~/.gradle/caches/ - It removes

2. Click on sync project with gradle files icon in android studio.

3. Run the project again.

It works for me.

Sunday, November 13, 2016

Tuesday, November 8, 2016

1. Which framework is best for mobile hybrid application development
Angular
ionic
ionic 2

Score =
Correct answers:

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CordovaPlugin.privateInitialize(java.lang.String, org.apache.cordova.CordovaInterface, org.apache.cordova.CordovaWebView

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CordovaPlugin.privateInitialize(java.lang.String, org.apache.cordova.CordovaInterface, org.apache.cordova.CordovaWebView, org.apache.cordova.CordovaPreferences)' on a null object reference

Monday, November 7, 2016

Saturday, October 1, 2016

set org.gradle.jvmargs=-Xmx1536M in the project gradle.properties

To run dex in process, the Gradle daemon needs a larger heap.
It currently has 1024 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to at least 1536 MB.
To do this set org.gradle.jvmargs=-Xmx1536M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html

Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformClassesWithDexForRelease'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Error:Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
Error:Execution failed for task ':transformClassesWithDexForRelease'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
Information:BUILD FAILED

Unable to start the daemon process.-Android studio

Error:Failed to complete Gradle execution.

Cause:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0

FAILURE: Build failed with an exception.

* What went wrong:
Unable to create daemon log file

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.