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即可.