Unity与安卓:上架谷歌提示“androidx.fragment:fragment (androidx.fragment:fragment)”发者表示版本 1.0.0 已过时

81 篇文章 1 订阅
30 篇文章 0 订阅

unity版本:2020.3.33f1直接打包aab 上架谷歌提审 出现如下

“androidx.fragment:fragment (androidx.fragment:fragment)”的开发者表示版本 1.0.0 已过时。在发布新版本之前,请考虑升级到以下版本之一:1.

添加:dependencies { ....   implementation 'androidx.fragment:fragment:1.3.6'  .... }  

// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN

// Android Resolver Repos Start
([rootProject] + (rootProject.subprojects as List)).each { project ->
    project.repositories {

        //保留这句 让as解析仓库url
        def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")

        //新镜像内容==========================================
        def jitpack_URL ='https://jitpack.io'
        def ALIYUN_releases_URL = 'https://maven.aliyun.com/repository/releases'
        def ALIYUN_jcenter_URL = 'https://maven.aliyun.com/repository/jcenter'
        def ALIYUN_central_URL = 'https://maven.aliyun.com/repository/central'
        def ALIYUN_plugin_URL = 'https://maven.aliyun.com/repository/gradle-plugin'
 
        def ALIYUN_REPOSITORY_URL = 'https://maven.aliyun.com/repository/public'
        def ALIYUN_JCENTER_URL = 'https://maven.aliyun.com/repository/google'

        maven {
            url ALIYUN_REPOSITORY_URL
            url ALIYUN_JCENTER_URL
 
            url jitpack_URL
            url ALIYUN_releases_URL
            url ALIYUN_jcenter_URL
            url ALIYUN_central_URL
            url ALIYUN_plugin_URL

            //原来旧的========
            url "https://maven.google.com"
            url "https://maven.google.com/" // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:7, Assets/GoogleMobileAds/Editor/GoogleUmpDependencies.xml:7
             //原来旧的========
 
        }      
        //新镜像内容==========================================

        mavenLocal()
        mavenCentral()
    }
}
// Android Resolver Repos End
apply plugin: 'com.android.library'
**APPLY_PLUGINS**

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.fragment:fragment:1.3.6'   //添加到这里
// Android Resolver Dependencies Start
    implementation 'com.google.android.gms:play-services-ads:22.3.0' // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:7
    implementation 'com.google.android.ump:user-messaging-platform:2.1.0' // Assets/GoogleMobileAds/Editor/GoogleUmpDependencies.xml:7
// Android Resolver Dependencies End
**DEPS**}

// Android Resolver Exclusions Start
android {
  packagingOptions {
      exclude ('/lib/armeabi/*' + '*')
      exclude ('/lib/mips/*' + '*')
      exclude ('/lib/mips64/*' + '*')
      exclude ('/lib/x86/*' + '*')
      exclude ('/lib/x86_64/*' + '*')
  }
}
// Android Resolver Exclusions End
android {
    compileSdkVersion **APIVERSION**
    buildToolsVersion '**BUILDTOOLS**'

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        minSdkVersion **MINSDKVERSION**
        targetSdkVersion **TARGETSDKVERSION**
        ndk {
            abiFilters **ABIFILTERS**
        }
        versionCode **VERSIONCODE**
        versionName '**VERSIONNAME**'
        consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
    }

    lintOptions {
        abortOnError false
    }

    aaptOptions {
        noCompress = ['.ress', '.resource', '.obb'] + unityStreamingAssets.tokenize(', ')
        ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
    }**PACKAGING_OPTIONS**
}**REPOSITORIES**
**IL_CPP_BUILD_SETUP**
**SOURCE_BUILD_SETUP**
**EXTERNAL_SOURCES**

如果在unity的工程下:Assets/Plugin/Android/mainTemplate 文件 添加了这句 直接打包aab上架谷歌还是显示 这条警告信息,就需要Unity导出AS工程,在AS工程里面导出aab即可.

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

AD_喵了个咪

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值