android studio报错Failed to resolve

图片说明

不记得做了什么事 就突然这样 新建项目可以运行 这个项目用很久之前的代码 也是不能运行 帮忙解决可发红包 qq291808500

1个回答

草 既然吧allprojects {
repositories {
google()
mavenCentral()
jcenter()
maven { url 'https://jitpack.io' }

}

}
的google放在第一行就好了

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Android Studio 第一次安装启动Failed to resolve报错解决方案
笔者近期准备着手做一个有关安卓的项目,兴冲冲地找来Android学习书籍,并下载安装了Android Studio。可是在Android Studio的第一次运行就遇到了很大的问题,各种莫名其妙的报错,以至于编译项目都没能成功。于是在CSDN上各种搜,确实找到了很多大佬分享的解决方案,但都没有直接解决问题。 那天从晚上10点一直尝试到凌晨5点钟,几乎所有方法都已用尽,差点想放弃回去睡觉的时候却误...
Failed to resolve: multidex Failed to resolve: runtime Failed to resolve: co
Android 错误:Failed to resolve: multidexrnShow in FilernrnrnFailed to resolve: runtimernOpen FilernrnrnFailed to resolve: commonrnOpen Filernrnrn[img=https://img-bbs.csdn.net/upload/201806/11/1528707710_980728.png][/img]rnrn求大神指导下。rnrnrnrnrnrnrn
Android studio Github 开源项目依赖添加失败解决方法 Failed to resolve
AndroidStudio虽然好用也很智能,但是有时会报一些奇奇怪怪的错误,提示的信息又不清不楚的,就简单几个字Failed to resolve,鬼知道我是怎么resolve不了,这次遇到一个问题,就是在Gradle里compile GitHub的开源项目时候怎么syn now  都编译不过,在网上这个错误也查不到,找了1整天,终于找到,现在记录下,也为了下次自己又遇到这个问题然后忘记之前是怎么
Failed to resolve。。问题原因
Android Studio3.1.4    Failed to resolve: com.github.joyrun.ActivityRouter:router:0.3.5 之所以出现Failed to resolve。。。。可以考虑是仓库的问题     这样改下:将 maven { url "https://dl.google.com/dl/android/maven2/" }...
Android Studio运行时报错:Could not resolve all dependencies for configuration ':app:_
第一次用Android Studio开发。但在Android Studio运行时报错:rnCould not resolve all dependencies for configuration ':app:_debugCompile'.rnCould not find any version that matches com.android.support:appcompat-v7:15.+.rn[img=https://img-bbs.csdn.net/upload/201612/11/1481461246_84118.png][/img]rn但我的SDK Manager安装了该有的组件了啊,求大神帮我看看问题出现在哪里了?rn[img=https://img-bbs.csdn.net/upload/201612/11/1481461448_395172.png][/img][img=https://img-bbs.csdn.net/upload/201612/11/1481461507_176640.png][/img]rnrn再附上build.gradle文件内容:rn[code=java]rnapply plugin: 'com.android.application'rnrnandroid rn compileSdkVersion 15rn buildToolsVersion "24.0.0"rnrn defaultConfig rn applicationId "com.test.helloworld"rn minSdkVersion 14rn targetSdkVersion 15rn versionCode 1rn versionName "1.0"rn rn buildTypes rn release rn minifyEnabled falsern proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'rn rn rnrnrndependencies rn compile fileTree(dir: 'libs', include: ['*.jar'])rn testCompile 'junit:junit:4.12'rn compile 'com.android.support:appcompat-v7:15.+'rnrnrn[/code]rnrnrnrn
failed to resolve com.android.support:appcompat-v7:23.4.0
自己的项目引入一个第三方的类库: compile 'com.afollestad.material-dialogs:core:0.8.5.9'rn这个类库本身用的是 com.android.support:appcompat-v7:23.4.0rn我自己项目用的是 com.android.support:appcompat-v7:23.3.0rnbuild项目时报错,如标题。rnSDK Manager 我已经下载到最新(没有提示更新):rnAndroid Support Library 23.2.1rnAndroid Support Respository 30rn可就是找不到com.android.support:appcompat-v7:23.4.0rn
Failed to resolve: com.android.support:appcompat-v7:22.2.0
今天发现了一个奇怪的问题rn我在家用Android studio 在gradle文件中引入support:appcompat-v7:22.2.0包的时候,总是出现Failed to resolve的错误,而我在公司的电脑就能正常引入。rn找了半天终于发先了不同,在公司电脑的SDK Manager没有下载Google Repository,但是在家的电脑上下载了。然后我将已下载的Google Repository删除,v7包就能正常引入了,请教诸位大神,这到底是为什么啊?v7 22.2 和包 和Google Repository 19 的包有冲突吗?rn[img=https://img-bbs.csdn.net/upload/201507/05/1436109006_829174.png][/img]rn图中红框就是今天的罪魁祸首,删掉它就能正常引入v7 22.2 [img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/8.gif][/img]
android studio gradle sync failed
详情见图,大佬救救我呀[img=https://img-bbs.csdn.net/upload/201904/08/1554706594_333185.jpg][/img][img=https://img-bbs.csdn.net/upload/201904/08/1554706606_787491.jpg][/img]
Android studio中transformClassesWithMultidexlistForDebug FAILED
[img=https://img-bbs.csdn.net/upload/201607/21/1469083706_218635.png][/img]rnReading program jar [E:\workspace\AoTuBa\app\build\intermediates\transforms\jarMerging\debug\jars\1\1f\combined.jar]rn:app:transformClassesWithMultidexlistForDebug FAILEDrnError:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.rn> java.io.IOException: Can't read [E:\workspace\AoTuBa\app\build\intermediates\transforms\jarMerging\debug\jars\1\1f\combined.jar] (Can't process class [com/tencent/wxop/stat/al.class] (Unknown verification type [95] in stack map frame))
Failed to resolve:io.reactivex:rxandroid:1.1.0
Failed to resolve:io.reactivex:rxandroid:1.1.0 这个问题怎么解决
Android Studio中 cannot resolve symbol的问题
安卓新手,在敲郭霖大佬的《第一行代码》第四章的内容,FragmentBestPractice例程遇到以下问题:rn[img=https://img-bbs.csdn.net/upload/201804/24/1524559218_108858.png][/img]rnrn当鼠标光标放在红色字符上,即“NewsContentFragment"和"refresh"上面,就会显示 cannoy resolve symbol 'NewsContentFragment',和cannot resolve method'refresh(java.lang.String,java.lang.String)',用了网上推荐的几种方法无果,特来求助。rnrn运行之后如下:rn[img=https://img-bbs.csdn.net/upload/201804/24/1524559589_760661.png][/img]rnrn不胜感激[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/83.gif][/img][img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/83.gif][/img]
android studio cannot resolve symbol XXX
[size=18px][/size]刚开始接触 Android studio ,发现编译一个项目的时候,报 cannot resolve symbol XXXrn如下rn[img=https://img-bbs.csdn.net/upload/201606/30/1467262037_367854.png][/img]rnrn而且源码里也显示rn[img=https://img-bbs.csdn.net/upload/201606/30/1467262095_140658.png][/img]rn,对这个源码里也显示这样rn不知道大伙有没有遇到过!rn我rnail+enter 导包没解决rnfile--> invalidate caches没解决 rngudle 没解决rnclean project 和重启也没解决rncompliseSDKVersion 修改SDK版本号也没解决rn可以看我的一个帖子rnhttp://blog.csdn.net/ws1836300/article/details/51787808rn请问,还有其他方法吗???求大神!!![/size]rn
Android Studio cannot resolve symbol app
![图片说明](https://img-ask.csdn.net/upload/201610/17/1476685744_718648.png)
Android Studio中报cannot resolve symbol r
最新的版本2.1.2,安装完后新建项目就报cannot resolve symbol r,折腾了两天,死活都解决不了。使用过的方法rn1、clean, rebuild 无效rn2、修改Build Tools版本号,从20.0.0到24.0.1都下载了,全都没用,sdk是下了15,19,23版本。无效rn3、点击Tools - Android - Sync Project。无效rn4、资源文件没有错误,只有Activity中的R报红,能运行,但编辑xml布局无效
安装android studio报错Failed to install Intel HAXM.
我按网上说的在BIOS里开启“Intel Virtualization Technology,vt-xrnrn但在安装Intel HAXM还是出错。。。。。rn求解。。。。
Resolve(LDomainPart);报错
Error:Socket Error # 10054 Connection reset by peer...rnrnwhy?
Android Studio查看源代码报错
我们经常用Android Studio 查看Android的源代码,今天我们就来学习查看源代码的正确姿势。Android Studio查看源代码我们用Android Studio查看源代码会遇到下面的问题。 这是由于Android SDK自带的Source源码包很小,并没有包括所有的Android Framework的源码,仅仅提供给应用开发参考用,一些比较少用的系统类的源码并没有给出。 “
Android studio启动时报错
防火墙设置让Android studio 可以通过即可
Android Studio运行时报错
一:Error:Execution failed for task ':app:_compileDebugJava'. > 找不到目录: E:\AndroidStudioProjects\example\app\build\generated\source\apt\debug 解决办法: 在E:\AndroidStudioProjects\example\app\build\gene
android studio初始化报错
解决引入报错 OpenCV error: Cannot load info library for OpenCV
android studio实时预览报错
[size=medium]安装android studio后新建一个project,activity_main.xml design标签,实时预览报错:android.content.res.Resources$NotFoundException: Unable to find resource ID #0x1080029 at 在project下,app->build,gradle(Mo...
android studio support_v7报错
![图片说明](https://img-ask.csdn.net/upload/201505/26/1432606673_471040.png)
android studio gradle 报错
我在用android studio导入从GITHUB上下的程序时出现下面的问题n![图片说明](https://img-ask.csdn.net/upload/201607/04/1467643622_746006.png)n并且上面运行的图标是灰色的![图片说明](https://img-ask.csdn.net/upload/201607/04/1467643822_529881.png)n不知道怎么解决了,在这里请教大家了,望赐教
Android Studio新建工程报错
[img=https://img-bbs.csdn.net/upload/201511/19/1447922888_703783.png][/img]rnrn如图. 启动AVD的时候失败 这是什么问题. 本人菜鸟一个. 搜了半天找不到rn另外想问问 一个工程 需要哪些对应 有时候还会遇到ADT 版本不对应 还有什么min
android studio运行时报错
刚遇到一个问题在Android studio编译的时候不会报错,但是运行的时候会报 Error:Execution failed for task ':video:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.proce
Android Studio报错 java.lang.IllegalStateException
package com.example.q9722.biancheng1;nnimport android.media.Image;nimport android.support.v4.app.Fragment;nimport android.support.v4.view.ViewPager;nimport android.support.v7.app.AppCompatActivity;nimport android.os.Bundle;nimport android.view.View;nimport android.view.WindowManager;nimport android.widget.ImageView;nnimport java.util.ArrayList;nimport java.util.List;nnpublic class MainActivity extends AppCompatActivity implements View.OnClickListenern ViewPager mviewPager;n mFragmentAdapter madapter;n FragmentOne mone;n FragmentTwo mtwo;n FragmentThree mthree;n List mFragmentList;n ImageView[] mimageViews;n @Overriden protected void onCreate(Bundle savedInstanceState) n super.onCreate(savedInstanceState);n getSupportActionBar().hide();n getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,n WindowManager.LayoutParams.FLAG_FULLSCREEN);n setContentView(R.layout.activity_main);n initViews();n madapter = new mFragmentAdapter(getSupportFragmentManager(),mFragmentList);n mviewPager.setOffscreenPageLimit(3);n mviewPager.setAdapter(madapter);n mviewPager.setCurrentItem(0);n mimageViews[1].setImageResource(R.drawable.blue_circle);n mviewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() n @Overriden public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) nn nn @Overriden public void onPageSelected(int position) n for(int i=0;i<3;i++) n mimageViews[i].setImageResource(R.drawable.write_circle);n n mimageViews[position].setImageResource(R.drawable.blue_circle);n nn @Overriden public void onPageScrollStateChanged(int state) nn n );n nn private void initViews() n mviewPager = (ViewPager) findViewById(R.id.viewpager);n mFragmentList = new ArrayList();n mone = new FragmentOne();n mtwo = new FragmentTwo();n mthree = new FragmentThree();n mFragmentList.add(mone);n mFragmentList.add(mtwo);n mFragmentList.add(mthree);n mimageViews = new ImageView[3];n mimageViews[0] = (ImageView) findViewById(R.id.iv1);n mimageViews[1] = (ImageView) findViewById(R.id.iv2);n mimageViews[2] = (ImageView) findViewById(R.id.iv3);n mimageViews[0].setOnClickListener(this);n mimageViews[1].setOnClickListener(this);n mimageViews[2].setOnClickListener(this);n nn @Overriden public void onClick(View v) n switch (v.getId()) n case R.id.iv1:n mviewPager.setCurrentItem(0,true);n break;n case R.id.iv2:n mviewPager.setCurrentItem(1,true);n break;n case R.id.iv3:n mviewPager.setCurrentItem(2,true);n break;n n nn
android studio新建工程报错
下面是第一行,还有一串AGPBI: {&quot;kind&quot;:&quot;error&quot;,&quot;text&quot;:&quot;Error retrieving parent for item: No resource found that matches the 根本原因,还是因为我们的jar包产生了冲突。因为是新建的工程,没有别的jar,所以不考虑重复。因为开始建立工程的buildtoolsversion没有,所以我降低了几个版本(28...
Android Studio 命令行报错
fing@fing:~/Android/Sdk/emulator$ emulator -avd Nexus_5X_API_27 Couldn’t statvfs() path: No such file or directory emulator: ERROR: x86 emulation currently requires hardware acceleration! Please ensur...
android studio 报错解决办法
android studio 报错: Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See http://b.android.c...
Android Studio 新建工程报错
装好 Android Studio,直接用自带模板生成工程,生成后如图:rn[img=https://img-bbs.csdn.net/upload/201501/13/1421140601_489202.png][/img]rnrn请问是哪里的问题?、rnAndroid 支持库也装了、rnrn编译运行也没有问题、就是编辑器会有红色看着不爽、
android studio 报错:java.util.zip.ZipException
在将eclipse的项目迁移到android studio的过程中报如下的错:rnExecution failed for task ':chachong:transformClassesWithJarMergingForDebug'.rn> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/nostra13/universalimageloader/cache/disc/DiskCache.classrnrn项目中用到的依赖:rndependencies rn compile fileTree(include: '*.jar', dir: 'libs')rn compile project(':PhotoSelector')rn compile project(':PullToRefresh-library')rn compile project(':uikit')rn compile project(':pickview')rn compile files('libs/glide-3.6.1.jar')rnrn其中PhotoSelector库中和uikit中用到了universalimageloader。rn困扰挺长时间了,请路过的大神指点迷津!
studio 创建一个project就报错 Failed to resolve: com.android.support:appcompat-v7:23.+
Failed to resolve: com.android.support:appcompat-v7:23.+rn刚试着用 studio 就出现了问题, 求大神指教 rn[img=https://img-bbs.csdn.net/upload/201510/28/1445997120_403334.png][/img]
引入jar包编译,failed to resolve的错误
在build.gradle加入 allprojects { repositories { maven { url "https://jitpack.io" } } } 或者 repositories { jcenter() maven { url "https://jitpack.io" }}
关于导入依赖出现的Failed to resolve*******的解决办法
当你导入库时例如: 点击同步有时会出现: 解决办法在根目录的gradle文件下加入 maven { url 'https://jitpack.io' }
Android studio:E/MultiWindowProxy: getServiceInstance failed!
[img=https://img-bbs.csdn.net/upload/201705/16/1494905183_362474.jpg][/img] 使用Android studio开发APP应用的时候,每次启动都会提示这个logcat,E/MultiWindowProxy: getServiceInstance failed!,但是又不影响APP的编译和运行,请问这个怎么消掉,有谁知道?看着红色的log就不爽。rn
安卓导入依赖包失败 Failed to resolve: ×××
安卓导入依赖包失败 Failed to resolve:*背景:前段时间作一个PDF阅读功能,无奈在引入远程仓库依赖包的时候AndroidStudio老是报错。Failed to resolve:*好了废话不多说,贴上我解决的过程,供工友们参考。前提:删除gradle.properties中proxy的配置,接着File->setting->proxy(搜索)->Noproxy. 1.我查看了依赖
android studio 中Failed to open database
android studio 中Failed to open database Could not open database ‘nn可能是什么原因呢,有人遇到过吗??用的是SQLite,操作都是最基础的,应该没有错误的,为什么会打不开呢,数据库的名字是“lili.db”,是不是应该取作lili,不要“.db”呢??
解决failed to resolve 各种第三方包的问题
留做自己记录 刚到公司从git上面下载的代码就是构建不成功 百度谷歌各种解决方案 最后在gradle.properties里面找到前人设置的代理模块  注释掉  问题解决
hibernate3报错: could not resolve property
求高手修改我的HQL语句。(SSH2/hibernate3)rnrn我的HQL语句如下:rnString hql = "From Question AS q WHERE q.qid IN(SELECT a.qid FROM Answer AS a WHERE a.userid=?)";rnrn报错信息:org.hibernate.QueryException: could not resolve property: qid of: org.lxh.myzngt.vo.Answer [From org.lxh.myzngt.vo.Question AS q WHERE q.qid IN(SELECT a.qid FROM org.lxh.myzngt.vo.Answer AS a WHERE a.userid=?)]rnrnrn表结构:表Answer 中有外键:qid 对应到表Question 中的q.id.rnrnQuestion.hbm.xml:rnrn rn rn rn rn rn rn rn rn rn rn rn rnrnAnswer.hbm.xml:rnrn rn rn rn rn rn rn rn rnrnrnrnQuestion.java:rnrnpublic class Question rn private int qid;rn private Set answers;rn public int getQid() rn return qid;rn rn public void setQid(int qid) rn this.qid = qid;rn rn public Set getAnswers() rn return answers;rn rn public void setAnswers(Set answers) rn this.answers = answers;rn rnrnrnAnswer.java:rnrnpublic class Answer rn private int aid;rn private int qid;rn private Question question;rn rn public Question getQuestion() rn return question;rn rn public void setQuestion(Question question) rn this.question = question;rn rn public int getAid() rn return aid;rn rn public void setAid(int aid) rn this.aid = aid;rn rn public int getQid() rn return qid;rn rn public void setQid(int qid) rn this.qid = qid;rn rn rn rnrn
报错:cannot resolve symbol createTempFile
运行下面的代码结果报错。rnrncannot resolve symbol createTempFilernrn代码:rnrn import java.io.File;rn import android.graphics.Bitmap;rn import android.graphics.BitmapFactory;rn import android.view.View;rn rn public final class Utilrn rn static Bitmap image;rn rn public static File getOutputMediaFile(byte[] data)rn rn rn image= BitmapFactory.decodeByteArray(data, 0, data.length);rn rn rn File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), "FrontFlash");rn rn rn rn // Create the storage directory if it does not existrn if (!mediaStorageDir.exists())rn rn if (!mediaStorageDir.mkdirs()) return null;rn rn rn // Create a media file namern String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());rn File mediaFile=null;rn rn //mediaFile = new File(mediaStorageDir.getPath() + File.separator + "IMG_" + timeStamp + ".jpg");rn rn mediaFile = new File.createTempFile("dsadsa", ".jpg");rn rn return mediaFile;rn rnrn
相关热词 c#检测非法字符 c#双屏截图 c#中怎么关闭线程 c# 显示服务器上的图片 api嵌入窗口 c# c# 控制网页 c# encrypt c#微信网页版登录 c# login 居中 c# 考试软件