Android IDE (AIDE) Support Forum

How to use androidx in aide?

I want to use circleimageview library, but this library use androidx. And i have an error “unknown type androidx”. Please help

2 Likes

Add google repo in top build gradle file

Show me your build.gradle @tschmid35

buildscript {
repositories {
jcenter()
google()
}

dependencies {
    classpath 'com.android.tools.build:gradle:3.3.0'
}

}

plugins {
id ‘org.sonarqube’ version ‘2.6.2’
}

allprojects {
repositories {
google()
jcenter()
}
}

sonarqube {
properties {
// Root project information
property ‘sonar.projectKey’, ‘org.adaway’
property ‘sonar.projectName’, ‘AdAway’
property ‘sonar.projectVersion’, ‘4.2.1’
}
}

1 Like

So how did you added androidx support to AIDE @tschmid35

Manualy in app build gradle file

/*
ext {
appcompat = ‘1.0.2’
constraint_layout = ‘1.1.3’
lifecycle = ‘2.0.0’
material = ‘1.1.0-alpha04’
room = ‘2.0.0’
support = ‘1.0.0’
work = ‘1.0.0’
html_textview = ‘3.4’
flexbox = ‘1.1.0’
}
/
/

dependencies {
implementation fileTree(dir: ‘libs’, include: [’*.jar’])
// Architecture components
implementation “androidx.lifecycle:lifecycle-extensions:${lifecycle}”
implementation “androidx.lifecycle:lifecycle-common-java8:${lifecycle}”
implementation “androidx.room:room-runtime:${room}”
annotationProcessor “androidx.room:room-compiler:${room}”
implementation “android.arch.work:work-runtime:${work}”

// Support libraries
implementation "androidx.appcompat:appcompat:${appcompat}"
implementation "androidx.cardview:cardview:${support}"
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation "androidx.preference:preference:${support}"
implementation "androidx.recyclerview:recyclerview:${support}"
implementation "androidx.fragment:fragment:${support}"
implementation "com.google.android.material:material:${material}"
implementation "androidx.vectordrawable:vectordrawable:${support}"
// Miscellaneous
implementation "com.google.android:flexbox:${flexbox}"
implementation "org.sufficientlysecure:html-textview:${html_textview}"

testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'

}
*/

1 Like

Am getting a lot of errors @tschmid35 but can’t fix, any help as to how to a fix

annontationProcessor isnt supported by aide.
Hope they will die it in future builds

just using previous version of library, ex. circleimageview:3.+ just change to lower version ex.circleimageview:2.0.0 or lowest…

like it

dependencies {
implementation fileTree(dir: ‘libs’, include: [’*.jar’])
implementation ‘androidx.appcompat:appcompat:1.0.0’
implementation ‘androidx.constraintlayout:constraintlayout:1.1.3’
implementation ‘com.google.android.material:material:1.0.0’
implementation ‘androidx.recyclerview:recyclerview:1.1.0’
implementation ‘androidx.legacy:legacy-support-v4:1.0.0’
implementation ‘androidx.lifecycle:lifecycle-livedata:2.0.0-rc01+’
implementation ‘androidx.cardview:cardview:1.0.0’
}

I still get a lot of ‘unknown type or field’ errors for Navigation, Fragment, and ConstraintLayout. Could anybody post a compete working grade-setup?

Search this forum for Androidx jar file. Download it, then set it as jar file for AIDE