我将Android Studio 从3.0.1更新到3.1,并注意到我现有项目中的一个不熟悉的文件:
.idea/caches/build_file_checksums.ser
Run Code Online (Sandbox Code Playgroud)
它取决于您是否将Android Gradle插件更新到最新的3.1.0 ; 一旦我在Android Studio 3.1中打开现有项目,它就会自动创建该文件build_file_checksums.ser,即使我让项目使用以前的3.0.1插件也是如此.
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
Run Code Online (Sandbox Code Playgroud)
我还在Android Studio 3.1中创建了一个新项目,发现该文件build_file_checksums.ser是从头开始创建的.
在撰写本文时,似乎没有正式文件.如果有人能找到它,我将不胜感激.
我用jdeserialize-1.2 检查了内容,因为Samuel指出它似乎包含了一些系统路径.
$ java -jar ~/Downloads/jdeserialize-1.2.jar .idea/caches/build_file_checksums.ser
read: com.android.tools.idea.gradle.project.ProjectBuildFileChecksums _h0x7e0002 = r_0x7e0000;
//// BEGIN stream content output
com.android.tools.idea.gradle.project.ProjectBuildFileChecksums _h0x7e0002 = r_0x7e0000;
//// END stream content output
//// BEGIN class declarations (excluding array classes)
class java.util.HashMap implements java.io.Serializable {
float loadFactor;
int threshold;
}
class com.android.tools.idea.gradle.project.ProjectBuildFileChecksums implements java.io.Serializable { …Run Code Online (Sandbox Code Playgroud) android gitignore android-studio android-gradle-plugin android-studio-3.1
Android文档提供以下警告.
此类在API级别P中已弃用.使用支持库DialogFragment可在所有设备上实现一致的行为并访问Lifecycle.
这是否意味着我作为开发人员的唯一变化是导入android.support.v4.app.DialogFragment而不是旧的android.app.DialogFragment?
android android-fragments android-alertdialog android-9.0-pie
今天我开始学习Flutter。我在 Mac 上使用 Android Studio。我已经
所以我可以在 Android Emulator 中运行 Flutter 应用程序。但是,当我选择 iOS 模拟器(Open iOS Simulator)时,它说这个
无法找到名为“Simulator.app”的应用程序
我没有任何使用 XCode 的经验,也没有在我的 Mac 中安装它。
我的问题是,
我发现了类似的问题,但没有弄清楚。
我正在尝试在 VS Code 中的真实 iOS 设备中运行我的应用程序,但我遇到了有关配置文件的错误,我已经将我的配置文件设置为自动,并且还设置了我的开发团队,一切都可以在 Xcode 中运行,但不能在 VS 代码中。
\n这是错误:
\nNo Provisioning Profile was found for your project\'s Bundle Identifier or your \ndevice. You can create a new Provisioning Profile for your project in Xcode for \nyour team by:\n 1- Open the Flutter project\'s Xcode target with\n open ios/Runner.xcworkspace\n 2- Select the \'Runner\' project in the navigator then the \'Runner\' target\n in the project settings\n 3- In the \'General\' tab, make sure a \'Development Team\' is selected. …Run Code Online (Sandbox Code Playgroud) animated这些方法的参数有什么作用UICollectionView:
selectItem(at indexPath: IndexPath?, animated: Bool, scrollPosition: UICollectionViewScrollPosition)`
Run Code Online (Sandbox Code Playgroud)
deselectItem(at indexPath: IndexPath, animated: Bool)
Run Code Online (Sandbox Code Playgroud)
我知道我可以使用该UICollectionViewLayout对象来为更改设置动画。我也知道我可以使用didSelect和 的didDeselect方法UICollectionViewDelegate来获取选定的单元格并应用动画。但是我找不到有关上述animated参数如何影响动画的任何信息。它会以任何方式影响布局动画吗?我的目标是创建一个UICollectionView子类,并允许消费者自定义在内部调用上述两种方法时是否应用动画。但我不知道这些方法控制什么动画。
我发现了一个陌生的文件.idea/jarRepositories.xml,当我更新的Android工作室3.5.3到4.0.1Mac上。内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
</component>
</project>
Run Code Online (Sandbox Code Playgroud)
如果我使用1.0.2,则3个图像的宽度是平均值,并且它们的高度由我设置的无线电计算.如果我使用1.1.0,它们的高度是0dp,我看不到任何东西,除非我设置
android:layout_height="match_parent"
在根目录中ConstraintLayout.
这是一个错误吗?这是我的代码:
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/iv0"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="#FF0000"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/iv1"
app:layout_constraintDimensionRatio="2:1"/>
<ImageView
android:id="@+id/iv1"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="#00FF00"
app:layout_constraintDimensionRatio="2:1"
app:layout_constraintLeft_toRightOf="@id/iv0"
app:layout_constraintRight_toLeftOf="@+id/iv2"/>
<ImageView
android:id="@+id/iv2"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="#0000FF"
app:layout_constraintDimensionRatio="2:1"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintLeft_toRightOf="@id/iv1"/>
</android.support.constraint.ConstraintLayout>
Run Code Online (Sandbox Code Playgroud) 在开发android的时候,我们在开发布局文件时通常会用到xml。
例子)
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
...
Run Code Online (Sandbox Code Playgroud)
我当时有一个疑问。如何访问http://schemas.android.com/apk/res/android?
因为我查到了一些资料。我知道这不是 URL,而是 URI。所以无法通过互联网访问。那么命名空间信息在哪里呢?如何访问该信息?
我想使用 Volley 从我的 Android 应用程序发送请求。
我已将其包含在 build.gradle 中
dependencies {
...
compile 'com.android.volley:volley:1.1.0'
}
Run Code Online (Sandbox Code Playgroud)
我想使用:
requestQueue queue = Volley.newRequestQueue(this);
Run Code Online (Sandbox Code Playgroud)
但既requestQueue不能Volley也不能解决。
我试过了:
import com.android.volley;
Run Code Online (Sandbox Code Playgroud)
但它也说凌空无法解决。我已经完成了 gradle 同步。
我没有下载任何东西。我的理解是将 Volley 添加到 build.gradle 代替了实际下载库?
我正在尝试创建一个简单的自定义布局以便UICollectionView以编程方式使用(即没有 Interface Builder)。
我根据文档做所有事情:
UICollectionViewLayout并准备我的布局layoutAttributesForSupplementaryView(ofKind elementKind: String, at indexPath: IndexPath)并返回相应的布局属性collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath)在我返回补充视图的地方添加实现我的问题是既不
collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath)
Run Code Online (Sandbox Code Playgroud)
也不
layoutAttributesForSupplementaryView(ofKind elementKind: String, at indexPath: IndexPath)
Run Code Online (Sandbox Code Playgroud)
正在被调用,所以我看不到我的补充意见。
我已经仔细检查了我的实现布局和补充视图的创建,但我仍然无法让它工作。
我的系统上有两个 Xcode,Xcode 10.2 和 Xcode 11。默认是 Xcode 10.2,如何让我的 Flutter 使用 Xcode 11?