小编Ali*_*pir的帖子

Android的执行失败的任务":应用程序:transformClassesWithDexForAvsDebug"

当我尝试在Android Studio上运行App时出现此错误:

错误:任务':app:transformClassesWithDexForAvsDebug'的执行失败.com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令'C:\ Program Files\Android\Android Studio\jre\bin\java.exe''以非零退出值2结束

添加multiDexEnabled true没有解决问题.

这些是gradle文件:

的build.gradle(模块:应用):

apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.application'
apply plugin: 'jp.leafytree.android-scala'
apply plugin: 'android-apt'
apply plugin: 'hugo'
apply plugin: 'com.mutualmobile.gradle.plugins.dexinfo'
apply from: 'config/quality.gradle'

repositories {
    flatDir {
        dirs 'libs'
    }
}
android {
    //Trigger the licenseFormat task at least once in any compile phase
    applicationVariants.all { variant ->
        variant.javaCompiler.dependsOn(rootProject.licenseFormat)
    }
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    defaultConfig {
        multiDexEnabled true
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode System.getenv("BUILD_NUMBER") as Integer ?: 99999
        versionName rootProject.ext.majorVersion …
Run Code Online (Sandbox Code Playgroud)

java android

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

找不到马克

这是我在 Python 中的代码:

parser = argparse.ArgumentParser()
parser.add_argument('--use_model', type=str, help='model location', required=True)
parser.add_argument('--model_dim', type=int, help='model dimension of words', required=True)
args = parser.parse_args()
f = open(args.use_model, "rb")
f.seek(0)
trained_model = pickle.load(f)
Run Code Online (Sandbox Code Playgroud)

_pickle.UnpicklingError: could not find MARK在最后一行出错。

在这个问题中:

_pickle.UnpicklingError: 找不到 MARK

它说这f.seek(0)解决了问题,但在我的情况下它没有。

python pickle

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

OpenGL ES - 虚线

我使用OpenGlEs10进行我的Android游戏开发,我想绘制虚线现在我正在使用此代码绘制我的线:

        gl.glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
        // gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);
        gl.glLineWidth(4.0f);
        gl.glVertexPointer(2, GL10.GL_FLOAT, 0, mBufDestVertices);
        gl.glDrawArrays(GL10.GL_LINE_LOOP, 0, mDesPoly.getNumPoints());
Run Code Online (Sandbox Code Playgroud)

我该如何改变它?我必须纹理线吗?如果是这样,怎么样?

android opengl-es

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

OpenGL-渲染到纹理-屏幕的特定区域

我在我的 OpenGL 游戏上实现了 FBO。我将渲染到屏幕的内容渲染为纹理,问题是渲染到纹理是从左下角开始的。看:

渲染到默认帧缓冲区的内容:

在此输入图像描述

附加到 FBO 的纹理渲染了什么:

在此输入图像描述

但我想要渲染到纹理的地方是:

在此输入图像描述

我怎样才能做到这一点?这里是渲染器Calass(FBO操作是在onDrawFrame函数中完成的):

public class CurlRenderer implements GLSurfaceView.Renderer {

// Constant for requesting right page rect.
public static final int PAGE = 1;
// Set to true for checking quickly how perspective projection looks.
private static final boolean USE_PERSPECTIVE_PROJECTION = false;
// Background fill color.
private int mBackgroundColor;
// Curl meshes used for static and dynamic rendering.
private CurlMesh mCurlMesh;
private RectF mMargins = new RectF();
private CurlRenderer.Observer mObserver;
// Page …
Run Code Online (Sandbox Code Playgroud)

android opengl-es

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

WebRTC - create PeerConnectionFactory object

i previously used WebRTC 1.0.22672, now i switched to last version 1.0.26885. previously i used this code to create PeerConnectionFactory And VideoSource Object and it worked fine:

PeerConnectionFactory.InitializationOptions initializationOptions =
            PeerConnectionFactory.InitializationOptions.builder(this)
                    .createInitializationOptions();
    PeerConnectionFactory.initialize(initializationOptions);

    //Create a new PeerConnectionFactory instance - using Hardware encoder and decoder.
    PeerConnectionFactory.Options options = new PeerConnectionFactory.Options();
    DefaultVideoEncoderFactory defaultVideoEncoderFactory = new DefaultVideoEncoderFactory(
            rootEglBase.getEglBaseContext(),  /* enableIntelVp8Encoder */true,  /* enableH264HighProfile */true);
    DefaultVideoDecoderFactory defaultVideoDecoderFactory = new DefaultVideoDecoderFactory(rootEglBase.getEglBaseContext());
    peerConnectionFactory = new PeerConnectionFactory(options, defaultVideoEncoderFactory, defaultVideoDecoderFactory);


    //Now create a VideoCapturer instance.
    VideoCapturer …
Run Code Online (Sandbox Code Playgroud)

android webrtc

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

for循环迭代器突然改变

这是我的方法,它只是一个嵌套循环:

IEnumerator startNewRound()
{
    string st = "???????????????????????????";
    for (int i = 0; i < st.Length; i++)
    {
        for (int j = i + 1; i < st.Length; j++)
        {
            for (int z = j + 1; z < st.Length; z++)
            {
                if (z > st.Length) continue;
                yield return new WaitForSeconds(0.1f);
                Debug.Log("I = " + i + " J = " + j + " Z= " + z);
            }
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

突然,循环程序内部冻结了几秒钟,并且'j'计数器改变了,所有东西都炸毁了!这是我的日志:

在此处输入图片说明

我不明白什么是错!

c# unity-game-engine

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

标签 统计

android ×4

opengl-es ×2

c# ×1

java ×1

pickle ×1

python ×1

unity-game-engine ×1

webrtc ×1