Chr*_*son 14 android android-studio
我有一个在Eclipse中启动的小项目.然后我将其导出到gradle文件,并将其导入AS(0.5.7).
起初,似乎没有多少工作,但在"build => make project"之后,我似乎没有得到任何突出显示的错误.
所以我尝试将应用程序运行到模拟设备.好吧,该设备从未启动,现在我在"String","ArrayList"等提及下得到红色波浪线,称它"无法解析符号".
什么f?
我尝试过清理和重建,以及"使用gradle文件同步项目".
我从哪里开始?我想继续在AS开发这么糟糕!
编辑:项目设置的屏幕截图:http://i.imgur.com/ycNyPaT.png
build.gradle的内容:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
}
apply plugin: 'android'
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
}
android {
compileSdkVersion 19
buildToolsVersion "19.0.1"
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}
Run Code Online (Sandbox Code Playgroud)
SIL*_*NIK 29
有更简单的方法,我认为更正确的方法:
对我来说,这成功地解决了这个问题(由于电脑的惊人断电造成的)
归档时间: |
|
查看次数: |
22921 次 |
最近记录: |