android studio cant lock,Android Studio无法确定所选项目包含哪种文件(Android Studio cannot determine what kind of f...

Android Studio无法确定所选项目包含哪种文件(Android Studio cannot determine what kind of files the chosen items contain)

我想将OSMDroidBonusPack库添加到我的项目中,所以我创建了一个libs文件夹并将jar文件拖放到其中。 当我右键单击jar文件并选择Add As Library Android Studio会说:

Android Studio无法确定所选项目包含哪种文件。

从列表中选择适当的类别。

- 课程

- 外部注释

- jar目录

- JavaDocs

- 源存档目录

- 来源

这是什么意思 ?

I want to add OSMDroidBonusPack library to my project, so I made a libs folder and dragged&dropped the jar file into it. When I right click on the jar file and choose Add As Library Android Studio says :

Android Studio cannot determine what kind of files the chosen items contain.

Choose the appropriate categories from the list.

- classes

- external annotations

- jar directory

- JavaDocs

- source archive directory

- sources

What does this mean ?

原文:https://stackoverflow.com/questions/27546752

更新时间:2019-11-10 08:46

最满意答案

我使用的jar文件已损坏,我认为这就是为什么Android Studio无法读取它。 我使用的是旧版本,它工作正常。

The jar file I used was corrupted, I thinks that's why Android Studio couldn't read it. I used an older version and it worked fine.

2014-12-19

相关问答

选择一个,按住ctrl (或mac command )并单击第二个文件,右键单击比较文件。 Select them both by selecting one, holding down ctrl (or command for mac) and clicking the second file, right-click, Compare Files.

Android Studio中的当前NDK支持是最小的,因此他们不赞成使用1.0。 在使用它时,会自动生成一个Android.mk文件,并在生成项目时编译源代码。 现在看来编译失败了,但你应该能够从Gradle Console获得最初的错误信息。 如果您没有收到任何其他错误消息,我怀疑由于NDK的安装路径( Android NDK )中存在空间,因此对ndk-build的调用失败, 您可以修复当前错误并继续使用当前设置,也可以禁用默认的NDK集成,创建Android.mk / Applicatio

...

我使用的jar文件已损坏,我认为这就是为什么Android Studio无法读取它。 我使用的是旧版本,它工作正常。 The jar file I used was corrupted, I thinks that's why Android Studio couldn't read it. I used an older version and it worked fine.

因为您正在调用setContentView()方法两次。 设置文本视图文本后的一次调用将替换当前布局,该布局将删除对布局所做的所有修改。 protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);

texte = (TextView) findViewById(R.id.text

...

您必须在设置中将其他项目添加为VCS根,它们将显示出来。 您甚至可以使用来自Subversion和Git等不同VCS的项目。 You have to add the other projects as VCS roots in your settings and they will show up. You can even use projects from different VCSs like Subversion and Git.

在Android Studio窗口(版本1.2)的右下角,有一个挂锁图标。 您可以单击它以在当前打开的文件的锁定/解锁之间切换。 我希望能帮助别人。 我还不清楚在SO上添加图像的答案。 但是按照上面的说明,您应该看到挂锁图标。 In the bottom-right corner of Android Studio window (version 1.2), there is a padlock icon. You can click it to toggle between lock/unloc

...

原因是文件有问题的文件name_file.iml the reason was file problematic file name_file.iml

你只需要compileTime 。 更改gradle文件将解决您的问题。 You only need lombok compileTime. Changing your gradle file will fix your problems.

你说你使用的是Android Studio,但默认情况下,Android Studio目前忽略你的Makefiles并使用它自己生成的文件,并且不支持本地依赖(现在)。 如果您停用内置支持并通过在您的build.gradle中放入类似以下内容的方式来调用ndk-build自己: android {

sourceSets.main {

jniLibs.srcDir 'src/main/libs' //set libs as .so's location instead of jniL

...

您可以通过两种方式执行此操作: 1)在新项目打开时打开旧项目,并在出现提示时选择(新窗口)。 有关使用多个项目/窗口的更多信息,请参阅此帮助页面 (帮助适用于IntelliJ IDEA,但它在Android Studio中的工作方式相同)。 2)将要查看的文件拖放到窗口中,它将在其自己的选项卡中打开。 如果您想在旧项目中引用许多文件,第一个选项最适合,如果您只想在一个文件中快速查看内容,则第二个选项最适合。 You can do this in two ways: 1) Open the olde

...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值