运行应用程序后,我收到此错误。
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.twitter.sdk.android:twitter:2.3.0.
Searched in the following locations:
file:/C:/Program Files/Android/Android Studio1/gradle/m2repository/com/twitter/sdk/android/twitter/2.3.0/twitter-2.3.0.pom
file:/C:/Program Files/Android/Android Studio1/gradle/m2repository/com/twitter/sdk/android/twitter/2.3.0/twitter-2.3.0.jar
https://jcenter.bintray.com/com/twitter/sdk/android/twitter/2.3.0/twitter-2.3.0.pom
https://jcenter.bintray.com/com/twitter/sdk/android/twitter/2.3.0/twitter-2.3.0.jar
file:/C:/Users/------/AppData/Local/Android/sdk/extras/android/m2repository/com/twitter/sdk/android/twitter/2.3.0/twitter-2.3.0.pom
file:/C:/Users/-----ppData/Local/Android/sdk/extras/android/m2repository/com/twitter/sdk/android/twitter/2.3.0/twitter-2.3.0.jar
file:/C:/Users/----/AppData/Local/Android/sdk/extras/google/m2repository/com/twitter/sdk/android/twitter/2.3.0/twitter-2.3.0.pom
file:/C:/Users/------/AppData/Local/Android/sdk/extras/google/m2repository/com/twitter/sdk/android/twitter/2.3.0/twitter-2.3.0.jar
Required by:
MYAPP:app:unspecified > com.firebaseui:firebase-ui-auth:1.1.1
MY build gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.myapp.myapp"
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
aaptOptions {
cruncherEnabled false
}
buildTypes {
// debug {
// minifyEnabled true
// useProguard false
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// }
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/fonts'] } }
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.android.support:support-v4:24.2.1'
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.android.volley:volley:1.0.0'
// FirebaseUI Database only
compile 'com.firebaseui:firebase-ui-database:1.1.1'
// FirebaseUI Auth only
compile 'com.firebaseui:firebase-ui-auth:1.1.1'
// FirebaseUI Storage only
compile 'com.firebaseui:firebase-ui-storage:1.1.1'
// Single target that includes all FirebaseUI libraries above
compile 'com.firebaseui:firebase-ui:1.1.1'
compile 'com.google.firebase:firebase-messaging:10.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.firebase:firebase-core:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
::
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
一直试图解决这个问题,不知道可能会出现什么问题,任何人如果能看一眼就会感激不尽。 还想知道我是否会降低火力ui或者某些东西会有所帮助。
答案 0 :(得分:1)
更改您的顶级(项目)build.gradle以包含此内容:
allprojects {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
}
对maven存储库的需求是noted in the documentation。
要解决您在评论中添加的清单合并问题,请更新您的AndroidManifest.xml
文件以包含工具命名空间:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.your.app.package"
xmlns:tools="http://schemas.android.com/tools">
然后添加supportsRTL
的覆盖:
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
tools:replace="android:supportsRtl"
此问题为discussed here。
答案 1 :(得分:0)
有些解决方案声称你必须这样做:
def myService
def download() {
// NOTE: I would recommend not using `request` as a variable
// name here since it's already an implicit variable
Request thatOtherRequest = Request.get(params.int("id"))
def filename = thatOtherRequest.origFileName
def outputStream = myService.downloadFileFromS3UsingAwsSdk(filename)
response.setContentType("application/octet-stream")
response.setHeader("Content-disposition", "attachment;filename=${filename}")
response.outputStream << outputStream
response.outputStream.flush()
return
}
在app文件夹内的build.gradle中的依赖项之上,它将解决上述问题