May 18, 2017

Error:The number of method references in a .dex file cannot exceed 64K. Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html

While building an android app in Android Studio, I got the below error and the build was failed.

Error: The number of method references in a .dex file cannot exceed 64K. Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html

The solution to avoid this error is, add the property "multiDexEnabled true" under defaultConfig in app's build.graddle file. It will look like below.

android {
    compileSdkVersion 23
    buildToolsVersion "24.0.0"

    defaultConfig {
        applicationId "com.sonuappz.app"
        minSdkVersion 14
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }


Update:

The above solution works for the issue but the root cause is because of multiple libraries added in the app may have same references inside. Try to identify what library exactly needed for the app and remove the extras. If still the issue occurs, above is the solution for it.

April 27, 2017

Error: oracle.maf.impl.cd.datasynch not found

[maf 2.3.1]

I am developing a mobile application with MCS offline sync feature using Oracle MAF. I have used AMPA for the implementation. After deploying the application, on click of "Pending Sync Actions", I got the below error.

Feature not found with id "oracle.maf.impl.cd.datasynch"



This is because the library might be deleted or corrupted in the application. To avoid this error, we need to re-add the library. Below is the procedure to do so.
  • Go to application properties -> Libraries and Classpath
  • If you see libraries "DataSynchFeature.jar" and "WebServiceCallsFeature.jar", remove them
  • Click on "Add JAR/Directory..." and go to the path <jdev_home>/jdeveloper/jdev/extensions/oracle.maf/FARs/CDM
  • Selet both the jar files "DataSynchFeature.jar" and "WebServiceCallsFeature.jar" and add them
  • Click Ok
Now clean and re-deploy the application. It worked for me.




February 14, 2017

Error: Calling the constructor for class oracle.jbo.server.SequenceImpl is not permitted

[JDev 12.1.3]

I have created an EntityObject in the Model project and assigned a DB sequence to the key attribute of it. While running the project, I got the below error.

[Static type checking] - [ADF security error] Calling the constructor for class oracle.jbo.server.SequenceImpl is not permitted.


To avoid this issue,
  • Go to the source of the entity object xml file
  • Search for the tag "TransientExpression"
  • Check the attribute trustMode. It may have the value "untrusted"
  • Change the value to "trusted". Save and run the app
Now the issue should be solved.

Note: The same solution is given in my previous post for the below error. This solution worked for both the issues.