Uncategorized

Android Gradle : multiDexEnabled property

Android Gradle : multiDexEnabled property

Android Build Error

Error:Execution failed for task ‘:app:transformClassesWithDexForDebug’.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536

Solution: Add the following multiDex property in your build.gradle.
multiDexEnabled true
so your build.gradle looks like follows

 

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.1"
    defaultConfig {
        applicationId "dhi_ti.com.repositoryapp"
        minSdkVersion 11
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.1.1'
    testCompile 'junit:junit:4.12'
    compile project(path: ':dhilib')
}

What is  multiDexEnabled true ? Why it is required ?

As per the documentation from Google, As the Android platform has continued to grow, so has the size of Android apps. When your app and the libraries it references reach a certain size, you encounter build errors that indicate your app has reached a limit of the Android app build architecture.

About the 64K reference limit

(APK) files contain executable bytecode files in the form of Dalvik Executable (DEX) files, which contain the compiled code used to run your app. 

The Dalvik Executable specification limits the total number of methods that can be referenced within a single DEX file to 65,536—including Android framework methods, library methods, and methods in your own code. In the context of computer science, the term Kilo, K, denotes 1024 (or 2^10). Because 65,536 is equal to 64 X 1024, this limit is referred to as the ’64K reference limit’.

Reference : https://developer.android.com/studio/build/multidex.html#about

 

Sanskrita Vyakarana : separation, distinction,analysis, explanation

Sanskrita Vyakarana : separation, distinction,analysis, explanation

Sanskrit is called as a perfect language, an unambiguous language and hence NASA preferred it for Artificial Intelligence. But why so ? How it is different from any other language in the world? Why it is called as a most scientific language? What is so unique in sanskrit language ?

To answer all the above questions, we have to really look into the vyakarana in sanskrit. Though I don’t have enough knowledge in sanskrit, I am writing these articles after exploring a little bit about sanskrit with the help of few online courses of sanskrit ( Vyoma Linguistic Labs : Learn Sanskrit From home )

Vyakarana in Sanskrit:

In english if I say Read it is a just a word and you can not give any more explanation for that, is there any logic behind formation of this word ? Is there any explanation for the word Read‘ or ‘Reading ? Definitely we don’t have any answer for this question.

In sanskrit there is nothing which has no explanation, there is a logic behind formation of each and every word. Let me take simple example

  1. There is a word पठति in sanskrit, which means Read but as I said above for every word there is an explanation, let us see how this word formed

पठति  = पठ्‌ + + ति 

पठ्‌ – धातुः [अर्थं निर्दिशति]

अ – विकरणप्रत्ययः [गणं निर्दिशति]

ति – तिङ्‌प्रत्ययः [लकारं निर्दिशति] |

2. भ्वादिः (प्रथमः गणः = भू इत्यादयः धातवः; “भवतिइत्यादीनि क्रियापदानि) | यस्य गणस्य आदौ भू-धातुः अस्ति, सः भ्वादिगणः |

विकरण प्रत्ययः शप्‌ → अ

उदाखाद्‌ (खादति), पठ्‌ (पठति), क्रीड्‌ (क्रीडति), वद्‌ (वदति); शुच्‌ (शोचति), वृत्‌ (वर्तते); जि (जयति), स्रु (स्रवति), हृ (हरति)

Hope these simple examples help us to understand how rich the sanskrit language is. All I am trying to tell here is learn sanskrit, we have plenty of online courses, videos, mobile applications but I prefer the following pointers because these mobile apps for sanskrit are really very nice.

Online tutorials For Learning Sanskrit

Sanskrit Learning Online Courses : http://www.sanskritfromhome.in/

Sanskrit Learning YouTube Videos : https://www.youtube.com/channel/UCp5mvCwXR-drTRyzNUUjdZg

Sanskrit Learning Android Mobile Applications : https://play.google.com/store/apps/developer?id=Vyoma_labs&hl=en

For CBSC Students : www.cbsesanskrit.com

Read More about Sanskrit : Interesting Facts About Sanskrit