I'm struggling with coming to terms with Andoid Studio after years working with Eclipse. I've imported an existing Eclipse simple project into AStudio 1.1.0 and altough it builds an APK
经过多年与Eclipse合作,我正在努力与Andoid Studio达成协议。我已经将现有的Eclipse简单项目导入到AStudio 1.1.0中,并且它构建了一个APK
Directory of C:\dev\projects\AndroidStudio\DiddyOsmdroid\TinyOsmdroid\build\out puts\apk
目录C:\ dev \ projects \ AndroidStudio \ DiddyOsmdroid \ TinyOsmdroid \ build \ out puts \ apk
25/02/2015 17:02 176,517 TinyOsmdroid-debug-unaligned.apk
25/02/2015 17:02 176,517 TinyOsmdroid-debug-unaligned.apk
25/02/2015 17:02 176,518 TinyOsmdroid-debug.apk
25/02/2015 17:02 176,518 TinyOsmdroid-debug.apk
It doesn't deploy to a tablet connected via USB. (It did the first time I tried it, but not now) I've edited the run configurations to try both 'USB' and 'choose'. I try to deploy and run by double clicking assembleDebug as suggested in the docs. The device is visible in the Android window, in that Log lines are shown.
它不会部署到通过USB连接的平板电脑。 (这是我第一次尝试,但现在没有)我编辑了运行配置以尝试“USB”和“选择”。我尝试按照文档中的建议双击assembleDebug来部署和运行。设备在Android窗口中可见,显示日志行。
My gradle file looks like:
我的gradle文件看起来像:
apply plugin: 'com.android.application'
android {
compileSdkVersion 7
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "osmdemo.demo"
minSdkVersion 3
targetSdkVersion 3
}
signingConfigs {
release {
storeFile file("c:/users/me/some.keystore")
storePassword "xxxxxxxxxxx"
keyAlias "some_alias"
keyPassword "yyyyyy"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
signingConfig signingConfigs.release
}
}
}
dependencies {
compile files('libs/osmdroid-android-4.1.jar')
compile files('libs/slf4j-android-1.5.8.jar')
}
I'd be grateful to get any suggestions.
我很感激能得到任何建议。
1 个解决方案
#1
0
Gradle wont excute the app on the emulator/device. It will only build and install. You have to run an adb command to run the app. This is essentially what the Run button on Android Studio does for you.
Gradle不会在模拟器/设备上执行应用程序。它只会构建和安装。您必须运行adb命令才能运行该应用程序。这基本上就是Android Studio上的“运行”按钮。
#1
0
Gradle wont excute the app on the emulator/device. It will only build and install. You have to run an adb command to run the app. This is essentially what the Run button on Android Studio does for you.
Gradle不会在模拟器/设备上执行应用程序。它只会构建和安装。您必须运行adb命令才能运行该应用程序。这基本上就是Android Studio上的“运行”按钮。