Target device: huawei-h60_l11-DU2TDM14CV024755Installing APK: D:\study\workspace\android\ShareFile\app\build\outputs\apk\app-debug.apkUploading file to: /data/local/tmp/com.lhs.sharefileInstalling com.lhs.sharefileDEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.lhs.sharefile" pkg: /data/local/tmp/com.lhs.sharefileLaunching application: com.lhs.sharefile/com.lhs.sharefile.MainActivity.DEVICE SHELL COMMAND: am start -n "com.lhs.sharefile/com.lhs.sharefile.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHERStarting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.lhs.sharefile/.MainActivity }Error type 3Error: Activity class {com.lhs.sharefile/com.lhs.sharefile.MainActivity} does not exist.build.gradle配置如下:apply plugin: 'com.android.application'android { compileSdkVersion 23 buildToolsVersion "21.1.2" defaultConfig { applicationId "com.lhs.sharefile" minSdkVersion 10 targetSdkVersion 21 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } dexOptions { incremental true } compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 }}dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.1.1'}求大神指导 手机是 Android 4.4版本 荣耀6 Android studio 1.5版本(1.4版本升级前可以正常真机运行)
1 回答
已采纳

lynhao
TA贡献81条经验 获得超57个赞
android {
compileSdkVersion 23
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.lhs.sharefile"
minSdkVersion 10
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
你的把 targetSdkVersion 21也改成你手机api对应的版本23试试,一般是可以的~
- 1 回答
- 0 关注
- 3580 浏览
添加回答
举报
0/150
提交
取消