I'm following the training on the developer.android.com site and when I arrived at the Building your first app / Starting another activity section I failed:
我正在跟踪开发人员的培训。android.com网站,当我到达你的第一个应用程序/启动另一个活动部分时,我失败了:
I've added the android-support-v7-appcompat library according to this site describes: http://developer.android.com/tools/support-library/setup.html#libs-with-res
我已经在这个网站上添加了android- supportv7 -appcompat库,它描述了:http://developer.android.com/tools/supportlibrary/setup.html #libs-with-res。
Where I select the libraries for an android project (Properties of the project / Android / Library) I clicked the add button, selected the project library (first picture), and after I pressed ok the project didn't build.
我选择了一个android项目的库(项目/ android /库的属性),我点击了add按钮,选择了项目库(第一张图片),在我点击ok之后,项目没有生成。
Before (everything is ok)
之前一切都是好的)
After
后
Before all this... I was somehow able to build the project, press the Play, but it unfortunately stopped (crashed) on my device immediately after starting. And the console said:
之前这一切……我在某种程度上能够构建这个项目,按下这个游戏,但不幸的是,它在启动后立即在我的设备上停止了。和控制台说:
[2014-07-23 15:06:45 - android-support-v7-appcompat] Could not find android-support-v7-appcompat.apk!
and that was the point when I started investigating the problem... yet unsuccessfully.
这就是我开始调查这个问题的时候…然而失败。
My question is, why "deactivating" the library after I check again?
我的问题是,为什么在我再次检查之后,“停用”库?
3 个解决方案
#1
6
The library project should be placed on the same drive with your workspace. the referencing project was in the same eclipse workspace as the library project.
库项目应该放在与您的工作空间相同的驱动器上。引用项目位于与库项目相同的eclipse工作区中。
#2
3
You should make a copy of appcompat-v7 and put it in your workspace, then have all the projects just reference it.
您应该复制appcompat-v7并将其放在您的工作区中,然后让所有的项目都只是引用它。
#3
0
I had the same problem : using GIT, my project was located on a server :
我遇到了同样的问题:使用GIT,我的项目位于服务器上:
\\BOB\Volume_1\GIT\Android\ICS
So i had to create a clone of my GIT repository on the same drive than my worspace :
因此,我必须在相同的驱动器上创建一个GIT存储库的克隆,而不是我的worspace:
D:\WSpaces\Android -> my workspace where is located android-support-v7-appcompat D:\WSpaces\GIT -> the GIT clone repository
I probably could have shared the android-support-v7-appcompat on my repository, not tested...
我可能会在我的存储库*享android-support-v7-appcompat,而不是测试……
#1
6
The library project should be placed on the same drive with your workspace. the referencing project was in the same eclipse workspace as the library project.
库项目应该放在与您的工作空间相同的驱动器上。引用项目位于与库项目相同的eclipse工作区中。
#2
3
You should make a copy of appcompat-v7 and put it in your workspace, then have all the projects just reference it.
您应该复制appcompat-v7并将其放在您的工作区中,然后让所有的项目都只是引用它。
#3
0
I had the same problem : using GIT, my project was located on a server :
我遇到了同样的问题:使用GIT,我的项目位于服务器上:
\\BOB\Volume_1\GIT\Android\ICS
So i had to create a clone of my GIT repository on the same drive than my worspace :
因此,我必须在相同的驱动器上创建一个GIT存储库的克隆,而不是我的worspace:
D:\WSpaces\Android -> my workspace where is located android-support-v7-appcompat D:\WSpaces\GIT -> the GIT clone repository
I probably could have shared the android-support-v7-appcompat on my repository, not tested...
我可能会在我的存储库*享android-support-v7-appcompat,而不是测试……