我正在接受安卓开发人员的培训,但我目前正陷入这里困境。我不知道如何在不破坏gradle的情况下导入样本工程。这些是我使用File > New > Import Project时的结果
/path/to/activity-lifecycle$ ./gradlew assembleDebug
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> failed to find target with hash string 'android-14' in: /home/user/Android/Sdk
* Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.273 secs编辑: Android 1.5.1,Gradle 2.8,Java 1.8.0_65,Debian8.2
EDIT2:确保更新activity-lifecycle/app/build.gradle而不是activity-lifecycle/build.gradle
发布于 2015-12-21 23:22:24
在build.grandle中,请确保
compileSdkVersion 22
如果它仍然不工作,打开"SDK管理器“并安装SDK。
为缩短:
打开“模块设置”、“属性”选项卡,选择构建版本和目标。
https://stackoverflow.com/questions/34405962
复制相似问题