رفتن به مطلب
انجمن اندروید ایران | آموزش برنامه نویسی اندروید و موبایل
  • android.png.1fab383bc8500cd93127cebc65b1dcab.png

پست های پیشنهاد شده

سلام دوستان من کتاب خانه calligraphy رو برای تغییر فونت برنامم میخوام استفاده کنم اما کد رو در گریدل که وارد میکنم ارور میگیره و بیلد نمیشه

این کد فایل گریدلم هست

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.xxx"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    //calligraphy font
    compile 'uk.co.chrisjenx:calligraphy:2.3.0'
}

و این هم اروری که میده

WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Affected Modules: app

 

لینک ارسال
به اشتراک گذاری در سایت های دیگر

 در صورتی که  compile 'uk.co.chrisjenx:calligraphy:2.3.0' رو به implementaion 'uk.co.chrisjenx:calligraphy:2.3.0' تغییر میدم پروژه بیلد میشه اما در زمان استفاده از کد و اجرا برنامه با این ارور مواجه میشم

 

11:02:39 AM: Executing task 'DownloadSources'...

Executing tasks: [DownloadSources]


> Configure project :app
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

> Task :app:DownloadSources FAILED

FAILURE: Build failed with an exception.

* Where:
Initialization script 'C:\Users\A\AppData\Local\Temp\ijmiscinit2.gradle' line: 19

* What went wrong:
Execution failed for task ':app:DownloadSources'.
> Could not resolve all files for configuration ':app:downloadSources_dfc26481-738c-40eb-b476-a513f60d874b'.
   > Could not find uk.co.chrisjenx:calligraphy:2.3.0@aar.
     Required by:
         project :app

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 3s
1 actionable task: 1 executed
11:02:43 AM: Task execution finished 'DownloadSources'.

 

لینک ارسال
به اشتراک گذاری در سایت های دیگر

فقط میدونم که اروری که میده میگه این فایل

http://'uk.co.chrisjenx:calligraphy:2.3.0'uk.co.chrisjenx:calligraphy:2.3.0@aar.

رو پیدا نمیکنم و میدونم که فایلی با پسوند aar در سایت

https://github.com/chrisjenx/Calligraphy

قرار داره اما نمیدونم این فایل رو چطور باید به پروژه اضافه کنم؟

لینک ارسال
به اشتراک گذاری در سایت های دیگر

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...