MemorizingTrustManager icon indicating copy to clipboard operation
MemorizingTrustManager copied to clipboard

Use MTM with Android Studio/Gradle

Open Rieger912 opened this issue 9 years ago • 3 comments
trafficstars

Hi,

I am trying to integrate MTM in an Android Studio project with gradle. Can you assist me in integrating it? I added "android.library.reference.1=submodules/MemorizingTrustManager" to gradle.properties (since I don't have a default.properties - is that correct?). Unfortunately it cannot resolve the name of the activity, when I add it to the AndroidManifest.xml of my app. Any idea?

Thanks folks!

Rieger912 avatar Feb 24 '16 08:02 Rieger912

  1. add include submodules:MemorizingTrustManager to settings.gradle
  2. in your build.gradle add into project dependencies: compile project('submodules:MemorizingTrustManager')

vitalyster avatar Jun 08 '16 12:06 vitalyster

For me that did not work, I had to do it slightly different.

settings.gradle:

include ':MemorizingTrustManager'
project(':MemorizingTrustManager').projectDir = new File('libs/MemorizingTrustManager')

app/build.gradle:

dependencies {
    compile project(':MemorizingTrustManager')
}

dbrgn avatar Jul 08 '16 10:07 dbrgn

I follow the above steps to do, the results appeared some problems Error:Could not get unknown property 'MemorizingTrustManager' for settings 'GoRunning' of type org.gradle.initialization.DefaultSettings. my local.properties sdk.dir=F\:\\sofeMuLu\\sdk\\androidsdk_4_5_6 #android.library.reference.1=E\:\\Application0206\\Git\\MemorizingTrustManager-master\\src android.library.reference.1=submodules/MemorizingTrustManager settings.gradle include ':app' include submodules:MemorizingTrustManager project(':MemorizingTrustManager').projectDir = new File('libs/MemorizingTrustManager')

build.gradle dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.2.1' compile 'org.igniterealtime.smack:smack-android-extensions:4.1.4' compile 'org.igniterealtime.smack:smack-tcp:4.1.4' compile project('submodules:MemorizingTrustManager') }

what should I do?

RenHaiRenWjc avatar Jan 17 '17 02:01 RenHaiRenWjc