所以我在我的电脑上重新安装了linux,在我重新安装android工作室之后,我试着把我写在我的手机上的应用程序以前没有成为问题.该应用程序针对的是API为16或更高版本的设备,但显然Android Studio现在具有N预览功能,不允许我在手机上运行任何内容.特别是当我点击运行按钮时它会告诉我
minSdk(API 23,N)!=设备Sdk(API 22)
我知道这似乎没有正确设置目标API,但当我启动项目时,我将其设置为16.现在我如何解决这个问题?还有什么更改项目目标API的最简洁方法?我只是改变构建gradle吗?
非常感谢!
app gradle文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-N'
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.example.josias.myapplication"
minSdkVersion 16
targetSdkVersion 'N'
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.+'}
Run Code Online (Sandbox Code Playgroud)
我尝试迁移到android-studio 3 canary 5并得到了这个错误
Error:Execution failed for task ':data:createFullJarDebug'.
> java.util.zip.ZipException: duplicate entry: META-INF/data_debug.kotlin_module
Run Code Online (Sandbox Code Playgroud)
在项目中,我有3个模块app
,data
,domain
我试图加
packagingOptions {
exclude 'META-INF/data_debug.kotlin_module'
}
Run Code Online (Sandbox Code Playgroud)
到app
,data
但错误出现了.
其他
在build.gradle
我补充说
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath = true
}
}
Run Code Online (Sandbox Code Playgroud)
改compile
到implementation
并删除retrolambda
这是所有我做过什么用于迁移到新的Android工作室.请帮我修复此错误.
更新
金丝雀7问题不会消失
我有下一种情况。Activity[FragmentWithPager[PageWithGrid]]
我想制作从list item
到的传统动画,DetailFragment
但我不知道wnat我做错了。我已经transitionName
在list item
和中的视图中添加了相同的内容,fragment detail
并尝试使用下面的代码制作过渡动画。
val fragmentTransaction = supportFragmentManager.beginTransaction()
transitionItems.forEach { view ->
fragmentTransaction.addSharedElement(view, view.transitionName)
}
val fragment = DetailFragment()
val transitionSet = TransitionSet().apply {
addTransition(ChangeTransform())
addTransition(ChangeClipBounds())
addTransition(ChangeBounds())
}
fragment.sharedElementEnterTransition = transitionSet
fragment.sharedElementReturnTransition = transitionSet
fragmentTransaction.replace(R.id.root, fragment)
fragmentTransaction.addToBackStack(null)
fragmentTransaction.commit()
Run Code Online (Sandbox Code Playgroud) android android-fragments android-viewpager kotlin android-transitions