小编cho*_*aab的帖子

我可以在片段中实现启动屏幕吗?

主要活动是登录页面。我还添加了一个启动画面。我想要的是将动画应用到启动屏幕。为此,我试图将其放在一个单独的片段中。我怎样才能做到这一点?

我已经创建了一个主题以及实现基本启动屏幕所需的一切。

android splash-screen fragment android-fragments

3
推荐指数
1
解决办法
2917
查看次数

如何使用Zxing库生成二维码?

我正在尝试为我的应用程序生成二维码。用户将输入一些文本,数据将传递到下一个活动,该活动将显示二维码。

这是我的代码。

public class QRgenerator extends AppCompatActivity {

ImageView imageView;
String Qrcode;
public static final int WIDTH = 500;


@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_qrgenerator);

    getID();

    Intent intent = getIntent();
    Qrcode = intent.getStringExtra("Data");


    //creating thread to avoid ANR exception
    Thread t = new Thread(new Runnable() {
        @Override
        public void run() {
            //the message to be encoded in the qr code.


            try {
                synchronized (this) {
                    wait(5000);

                    //runonUIthread on the main thread
                    runOnUiThread(new Runnable() {
                        @Override
                        public void run() …
Run Code Online (Sandbox Code Playgroud)

android qr-code zxing

1
推荐指数
1
解决办法
7348
查看次数

如何在android中解决重复文件异常?

我正在尝试使用聊天应用程序Firebase.代码似乎没问题但我在尝试运行项目时遇到了一个奇怪的错误.

这是错误:

Error:FAILURE: Build failed with an exception.
Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException:com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE
File1: C:\Users\Aadesh\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.2.2\285cb9c666f0f0f3dd8a1be04e1f457eb7b15113\jackson-annotations-2.2.2.jar
File2: C:\Users\Aadesh\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.2.2\3c8f6018eaa72d43b261181e801e6f8676c16ef6\jackson-databind-2.2.2.jar
File3: C:\Users\Aadesh\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.2.2\d20be6a5ddd6f8cfd36ebf6dea329873a1c41f1b\jackson-core-2.2.2.jar


* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
Run Code Online (Sandbox Code Playgroud)

可能是什么问题,我该如何解决这个问题?

Gradle文件:

apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion "25.0.0"
defaultConfig {
    applicationId "com.example.aadesh.chatnow"
    minSdkVersion 17
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled …
Run Code Online (Sandbox Code Playgroud)

android json firebase-realtime-database

1
推荐指数
1
解决办法
2827
查看次数