实际上,我不知道为什么会出现这个错误.
遵循代码,希望有一切对诊断有用.
应用程序的结构是Navigation Drawer Activity一个Fragment内部标准.该Fragment有RecyclerView.
使用的设备是Motorola XT1068(Android 6.0,API 23).
logcat的
03-26 16:07:54.340 20272-20272/com.example.ves.gennaio3 E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.ves.gennaio3, PID: 20272
    android.content.res.Resources$NotFoundException: Resource ID #0x7f07006e
        at android.content.res.Resources.getValue(Resources.java:1351)
        at android.support.v7.widget.AppCompatDrawableManager.loadDrawableFromDelegates(AppCompatDrawableManager.java:330)
        at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:195)
        at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:188)
        at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:100)
        at android.support.v7.widget.AppCompatImageHelper.setImageResource(AppCompatImageHelper.java:85)
        at android.support.v7.widget.AppCompatImageView.setImageResource(AppCompatImageView.java:94)
        at com.example.ves.gennaio3.models.RecyclerViewAdapter.onBindViewHolder(RecyclerViewAdapter.java:38)
        at com.example.ves.gennaio3.models.RecyclerViewAdapter.onBindViewHolder(RecyclerViewAdapter.java:17)
        at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6482)
        at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6515)
        at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5458)
        at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5724)
        at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5563)
        at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5559)
        at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2229)
        at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1556)
        at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1516)
        at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:608)
        at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3693)
        at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3410)
        at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3962)
        at …Run Code Online (Sandbox Code Playgroud) MyActivity有setContentView(MySurfaceView)覆盖所有屏幕.
我想将屏幕分为两个部分:第一2/3屏幕的必须由占据MySurfaceView最后的1/3通过my_activity_layout.xml.
我怎样才能做到这一点?谢谢.
编辑
谢谢你的回答,但我没有如何在我的情况下应用它们.要清楚,这些是我的目标:
我已经编辑了 Activity.xml 的结构,现在我收到了消息
此处不允许包含元素
。你知道为什么吗?
在一些帖子中,我读到这可能是由于compileSdkVersion和minSdkVersion或,targetSdkVersion但我的看起来是正确的:
compileSdkVersion 26
    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 26
Run Code Online (Sandbox Code Playgroud)
活动.xml
<?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        tools:context=".StoreListActivity">
        <fragment
            android:id="@+id/fragment_container"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:scrollbars="vertical"
            android:layout_weight="1"
            tools:context=".StoreListFragment"
            app:layout_behavior="@string/appbar_scrolling_view_behavior">
            <include layout="@layout/store_list" />    <---- ERROR HERE
            <android.support.design.widget.FloatingActionButton
                android:id="@+id/fab"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom|end"
                android:layout_margin="@dimen/fab_margin"
                android:src="@drawable/ic_list_view"
                app:backgroundTint="@color/colorPrimaryLight" />
        </fragment>
    </LinearLayout>
Run Code Online (Sandbox Code Playgroud) 在我的网页上只有一个视频。它在 Edge 上运行良好,但在移动设备和 Chrome 上运行不佳。
关于这个主题有很多问题,但没有一个可以解决我的问题。
编辑
我得到Cannot resolve symbol FirebaseVisionTextDetector的错误,当我把我的模块中:
import com.google.firebase.ml.vision.text.FirebaseVisionTextDetector;
Run Code Online (Sandbox Code Playgroud)
我不明白为什么,因为gradle我有正确的实现:
implementation 'com.google.firebase:firebase-ml-vision:18.0.1'
Run Code Online (Sandbox Code Playgroud)
解决了
我已通过降级到来解决16.0.0。仍然不知道为什么。
implementation 'com.google.firebase:firebase-ml-vision:16.0.0'
Run Code Online (Sandbox Code Playgroud) 我已尝试在互联网上找到的每个解决方案,但我仍然收到以下错误:
Failed to resolve: com.google.firebase:firebase-core:16.0.5
Run Code Online (Sandbox Code Playgroud)
可能是什么原因?我已经检查了所有的实现列表是否完整且版本正确.我还检查了类路径和其他所有内容.但没有任何作品!
build.grande(模块)
apply plugin: 'com.android.application'
android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.example.ves.gennaio3"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support:cardview-v7:26.1.0'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:support-v4:26.1.0'
    implementation 'com.android.support:recyclerview-v7:26.1.0'
    implementation 'com.google.firebase:firebase-auth:16.0.5'
    implementation 'com.google.firebase:firebase-core:16.0.5'
    implementation 'com.google.firebase:firebase-database:16.0.4'
    implementation 'com.google.firebase:firebase-ml-vision:18.0.1'
    implementation 'com.google.firebase:firebase-firestore:17.1.2'
    implementation 'com.github.satyan:sugar:1.5'
    implementation 'com.rmtheis:tess-two:6.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' …Run Code Online (Sandbox Code Playgroud) 我得到错误:
Run-time error '91': Object variable or With block variable not set 
当我尝试执行此代码时:
MsgBox Worksheets("Sheet2").Range("2:2").Find(Worksheets("Sheet1").Range("E5").Value, , , xlWhole)
Run Code Online (Sandbox Code Playgroud)
为什么?这行怎么了?
编辑
如果我正在管理文本或数字,则该代码有效。但我有一个问题,我有什么日期上Worksheets("Sheet1").Range("E5")和Worksheets("Sheet2").Range("2:2")。