克隆Android Studio中的一个项目的Gradle导致异常 [英] Cloning a project in Android Studio causes gradle exception

查看:493
本文介绍了克隆Android Studio中的一个项目的Gradle导致异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个核心,IOS,Android和桌面子项目ligdx / robovm / gradle这个/机器人工作室项目。我想克隆Android的子项目,并创建非常相似的一(我把它命名为Android的满)。我已经复制粘贴的Andr​​oid目录,并更名以及里面的东西它(的build.gradle,AndroidManifest.xml中)。在settings.gradle我已经添加了'机器人满到列表中。在的build.gradle(根目录下)我已经复制粘贴的项目(:机器人),项目(:机器人全)。当我尝试同步gradle这个我得到异常:

I have ligdx/robovm/gradle/android studio project with core, ios, android and desktop subprojects. I wanted to clone android subproject and create very similar one (I named it android-full). I've copy-pasted android directory and renamed it as well as stuff inside it's (build.gradle, AndroidManifest.xml). In settings.gradle I've added 'android-full' to the list. In build.gradle (root directory) I've copy-pasted project(":android") to project(":android-full"). When I'm trying to sync gradle I'm getting an exception:

错误:与外部系统工作期间异常:

Error:exception during working with external system:

从这里原木全部堆栈跟踪:

Full stacktrace from logs here:

http://pastebin.com/T2XUWtYN

这甚至创造GitHub库与示范项目,对我来说libgdx论坛上的人(有2个机器人子项目OFC)。摇篮适用于它没有任何问题。在这里,它是: https://github.com/piotr-j/doubledroid
但是,当我复制粘贴源$ C ​​$ C从核心/ src目录和Android / Android的完整(没有的build.gradle)我立刻得到了同样的异常。我还比较有差异检查的gradle所有文件和他们几乎相同(结构是相同的,以及gradle这个版本,我只有更加库)。

A guy from libgdx forums even created github repo with demo project for me (with 2 android subprojects ofc). Gradle works on it without any problem. Here it is: https://github.com/piotr-j/doubledroid But when I've copy-pasted source code from core/src and android/android-full (without build.gradle) I've immediately got the same exception. I also compared all gradle files with diff checker and they're almost the same (structure is the same as well as version of gradle, I only have more libs).

我用最新的Andr​​oid工作室(1.4)和2.4的gradle

I use latest android studio (1.4) and gradle 2.4.

我试图重新启动机器人工作室,从头做的一切,删除.gradle目录,在.idea CONFIGS搞乱,目前仍是相同的异常,这是不是很丰富。

I've tried restarting android studio, doing everything again from scratch, deleting .gradle directory, messing in .idea configs and still the same exception, which isn't very informative.

推荐答案

我不明白怎么回事,但我解决了这一问题。我刚刚导入它在Eclipse(与gradle这个插件)。项目出现没有任何问题。然后我意识到有修复code,清洁和放小错误;再次建造的一切。然后项目的工作,我关闭并重新开启Android工作室。然后,它只是工作!一些VS的gradle工作室Android的错误,我猜。

I don't understand how, but I fixed the problem. I just imported it in Eclipse (with gradle plugin). Project appeared without any problem. Then I realized there were fix small bugs in code, cleaned & builded everything again. Then project worked, I closed it and opened Android Studio again. Then it just worked! Some gradle vs android studio bug I guess.

这篇关于克隆Android Studio中的一个项目的Gradle导致异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆