2

I am getting the following run-time error: android.content.res.Resources$NotFoundException: File res/mipmap-xxhdpi-v4/ic_launcher.png from xml type layout resource ID #0x7f030000

To my understanding it is a problem where the ic_launcher cannot be accessed however i unziped the compiled apk and i can see the image in the correct folder, so this leads me to believe that it is being caused by another problem.

AndroidManifext:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.will.inspiredemo">
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<uses-permission android:name="android.permission.READ_PHONE_STATE" />

<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme"
    >

    <meta-data
        android:name="com.dji.sdk.API_KEY"
        android:value="API-KEY"
        />
    <activity
        android:name="MainActivity"
        android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <service
        android:name="org.connectbot.service.TerminalManager"
        android:configChanges="keyboardHidden|orientation" />
</application>

the error is occurring in here

Java:

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    DJIDrone.initWithType(this.getApplicationContext(), DJIDroneType.DJIDrone_Inspire1);
    new Thread() {
        public void run() {
            try {
                DJIDrone.checkPermission(getApplicationContext(), new DJIGerneralListener() {

                    @Override
                    public void onGetPermissionResult(int result) {
                        // TODO Auto-generated method stub

                    }
                });
            } catch (Exception e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
    }.start();


        mDjiGLSurfaceView = (DjiInspireGLSurfaceView) findViewById(R.id.DjiSurfaceView);

        mDjiGLSurfaceView.start();
        try
        {
        DJIDrone.connectToDrone();
        }
        catch(Exception e)
        {
            System.out.println(e);
        }
        mReceivedVideoDataCallBack = new DJIReceivedVideoDataCallBack() {

            @Override
            public void onResult(byte[] videoBuffer, int size) {
                // TODO Auto-generated method stub
                //recvData = true;
                mDjiGLSurfaceView.setDataToDecoder(videoBuffer, size);
            }


        };

        DJIDrone.getDjiCamera().setReceivedVideoDataCallBack(mReceivedVideoDataCallBack);


        mConnectStateTextView = (TextView) findViewById(R.id.ConnectStatePreviewTextView);

    }

Sorry for my English it is not my first language

WIll
  • 45
  • 6
  • did you manage to solve this issue ? – carpinchosaurio Mar 26 '19 at 18:11
  • Got this error on VS2019 for Mac after upgrading. Downgrading Xamarin.Android fixed it for me. [Here](https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-builds-d15-9/) is the link to the version I downgraded to which worked for me. Although this post might not be related to Xamarin, just putting this out here for anyone else ending up here – Ahs N Apr 12 '19 at 13:53

0 Answers0