Wo das 'android.useAndroidX' property hinzufügen?

  • Hallo zusammen


    Wollte das hier verwenden -> https://github.com/journeyapps/zxing-android-embedded


    Dazu habe ich der build.gradle (von der App, nicht vom Projekt) wie auf der Seite empfohlen diese beiden Zeilen hinzugefügt:


    implementation 'com.journeyapps:zxing-android-embedded:4.1.0'
    implementation 'androidx.appcompat:appcompat:1.0.2'



    ...nun ist es aber so, dass jetzt diese Meldung kommt:


    "This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry.The following AndroidX dependencies are detected: androidx.core:core:1.0.1, androidx.versionedparcelable:versionedparcelable:1.0.0, androidx.slidingpanelayout:slidingpanelayout:1.0.0, androidx.fragment:fragment:1.0.0, androidx.appcompat:appcompat:1.0.2, androidx.customview:customview:1.0.0, androidx.swiperefreshlayout:swiperefreshlayout:1.0.0, androidx.interpolator:interpolator:1.0.0, androidx.loader:loader:1.0.0, androidx.drawerlayout:drawerlayout:1.0.0, androidx.viewpager:viewpager:1.0.0, androidx.collection:collection:1.0.0, androidx.localbroadcastmanager:localbroadcastmanager:1.0.0, androidx.lifecycle:lifecycle-common:2.0.0, androidx.arch.core:core-common:2.0.0, androidx.annotation:annotation:1.0.0, androidx.lifecycle:lifecycle-livedata:2.0.0, androidx.legacy:legacy-support-core-ui:1.0.0, androidx.lifecycle:lifecycle-viewmodel:2.0.0, androidx.lifecycle:lifecycle-livedata-core:2.0.0, androidx.legacy:legacy-support-v4:1.0.0, androidx.media:media:1.0.0, androidx.arch.core:core-runtime:2.0.0, androidx.legacy:legacy-support-core-utils:1.0.0, androidx.documentfile:documentfile:1.0.0, androidx.vectordrawable:vectordrawable-animated:1.0.0, androidx.cursoradapter:cursoradapter:1.0.0, androidx.lifecycle:lifecycle-runtime:2.0.0, androidx.coordinatorlayout:coordinatorlayout:1.0.0, androidx.asynclayoutinflater:asynclayoutinflater:1.0.0, androidx.vectordrawable:vectordrawable:1.0.1, androidx.print:print:1.0.0Affected Modules: app"



    Nun: Scheinbar egal ich ich nun android.useAndroidX=true hinzufüge, es kommt dieselbe Meldung:"Could not get unknown property 'android' for root project 'MyApplication' of type org.gradle.api.Project.Open File"


    Habe noch extra ne Issue dazu eröffnet: https://github.com/journeyapps…droid-embedded/issues/562


    Vielen Dank für die Feedbacks.


    P.S.: Kann ich hier irgendwo eine Signatur hinzufügen, zwecks Grussformel?



    Grüsse, Jan

  • Gleiches Problem wenn ich die ältere Version davon verwende:


    implementation('com.journeyapps:zxing-android-embedded:4.1.0') { transitive = false }
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'com.google.zxing:core:3.3.0'

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!