伙计们,当我尝试在真实设备上运行我的应用程序时,但在升级到1.22.2后发现错误:
Required by:
project :app > project :location
> Failed to list versions for com.google.android.gms:play-services-location.
> Unable to load Maven meta-data from https://jcenter.bintray.com/com/google/android/gms/play-services-location/maven-metadata.xml.
> Could not get resource 'https://jcenter.bintray.com/com/google/android/gms/play-services-location/maven-metadata.xml'.
> Could not GET 'https://jcenter.bintray.com/com/google/android/gms/play-services-location/maven-metadata.xml'.
> Read timed out
我的android\app\build。格拉德尔:
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
applicationId "io.bujupah.hestia"
minSdkVersion 17
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
flutter {
source '../..'
}
dependencies {
implementation 'com.google.android.gms:play-services-auth:16.0.1'
testImplementation'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.17.0'
implementation 'com.android.support:multidex:1.0.3'
}
我的android\build。格拉德尔:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.2'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
当我运行颤振时——版本:
颤振1.22.4•通道稳定•https://github.com/flutter/flutter.git框架•版本1aafb3a8b9(4个月前)•2020-11-13 09:59:28-0800发动机•版本2c956a31c0工具•Dart 2.10.4
我的位置插件:
# flutter_map_marker_cluster: any
flutter_polyline_points: ^0.2.4
geolocator: ^6.1.1
geocoding: ^1.0.5
location: ^3.0.2
将Jcenter()
替换为mavenCentral()
对我很有用。
repositories {
google()
mavenCentral() // Add this
jcenter() // remove this
}
下面这些变化对我来说很有用
//Project level build.gradle
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.+'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.10'
}
}
//App level build.gradle
configurations.all {
resolutionStrategy {
force 'com.google.android.gms:play-services-location:16.0.0'
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.firebase:firebase-analytics:17.2.2'
implementation 'com.google.android.gms:play-services-location:16.0.0'//add this line
}
解决方案是更新
dependencies {
com.android.tools.build:gradle:3.6.2
}
到
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
}
然后将distributionUrl更新为
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
在此输入图像描述失败:生成失败,出现异常。 错误:任务“:app:checkdebugaarmadata”的执行失败 无法解析配置“:app:debugRuntimeClasspath”的所有文件。无法解析com。谷歌。Androidgms:播放服务位置:16。所需人员:项目:应用程序 > 尝试:使用--stackTrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获取更多
看起来Bintray库已经关闭,我无法构建我的应用程序。我尝试了很多解决方案,但都不奏效。类似的github问题已经在没有任何适当帮助的情况下关闭了。Github链接:https://github.com/flutter/flutter/issues/94400 这就是我得到的错误: 正在启动lib\main。sdk gphone x86 arm上的dart处于调试模式。。。正在运行Gradle任
问题内容: 几天来,我一直在用头撞墙。尽管阅读了许多描述GPS登录失败的众多问题/解决方案的文章,但我仍无法找到解决问题的方法。 简而言之,我正在使用LibGDX框架在Android Studio中开发游戏,并添加了BaseGameUtils作为库并添加了所有必需的依赖项等。 问题陈述: 游戏开始时,它尝试连接到GPGS,但始终以“无法登录”消息作为响应。日志猫包含以下消息: 根据https://
有人知道这是怎么回事吗?
我试图建立一个通用服务器总是在连接的客户端。 该体系结构由4个主要组件组成 有状态应用服务器 无状态网关服务器 客户排队 系统和经纪人 工艺流程 客户端连接到网关 我正在使用JavaNetty作为网关。appserver也是用Java编写的。 我很想说这个设计像Mongrel2,但我不能完全确定。我想说,这更符合城市飞艇氦边缘服务器的设计(http://urbanairship.com/blog/
JAGS 游戏服务器是一个开源的 Java / AS 3.0 的游戏服务器,支持多玩家、碰撞检测以及键盘事件等等。