Activity Class cannot be found in AAR file java.lang.NoClassDefFoundError

后端 未结 6 2098
暖寄归人
暖寄归人 2021-01-04 01:54

I have created an android library, it contains an Activity Class that uses to open camera intent, the library works perfect excepts for the part that invokes the Activity to

6条回答
  •  -上瘾入骨i
    2021-01-04 02:29

    Although I don't know the root cause, you can try this solution: in your app project, define an activity extends from ScannerViewActivity, and declare it in AndroidManifest.xml.

    class MyScannerViewActivity extends ScannerViewActivity {
        // do nothing or something you want
    }
    

    Then you should start MyScannerViewActivity instead of ScannerViewActivity by intent.

提交回复
热议问题