在调试模式下,我得到了一个源代码未找到的消息.我使用Andorid-10来匹配我的设备.在'android-sdk\sources'中我有android-14和Android-15.我如何以及在哪里获得Andorid-10源代码树.我查看了 http://developer.android.com/sdk/android-2.3.3.html 但我找不到下载源代码.
我正在尝试从我的主要活动开始一项活动.它没有工作,让我疯了.我有的是:
Intent i = new Intent ("net.xxx.View1");
Context con = this.getBaseContext();
ComponentName cn = new ComponentName("net.xxx.Mybooks", "BookView");
i.setComponent(cn);
Bundle extras = new Bundle();
ooo
i.putExtras(extras);
startActivity(i);
Run Code Online (Sandbox Code Playgroud)
Manifest is:
android:name="BookView" >
<intent-filter >
<action android:name ="android.intent.action.VIEW" />
<action android:name ="net.xxx.View1" />
<category android:name ="android.intent.category.DEFAULT" />
</intent-filter>
Run Code Online (Sandbox Code Playgroud)
我得到的是:
*02-03 19:34:47.448:E/AndroidRuntime(2027):android.content.ActivityNotFoundException:无法找到显式活动类{net.xxx.Mybooks/BookView}; 你有没有在你的AndroidManifest.xml中声明这个活动*
我想,如果'/'是'',那么这是正确的.
我尝试使用上下文并且没有任何componetName,结果总是相同的.
SdkVersion ="10"先
谢谢你的帮助
Cliff
我正在尝试将项目从 Eclipse 导入到 Android Studio 中。\n在 Eclipse 中,我将其导出到 gradle,然后将其导入到 Android Studio 中。\n注意:我是 gradle 新手,对问题没有洞察力。\n现在我收到此错误:
\n> Configure project :\n Running gradle version: 6.8\n\nFAILURE: Build failed with an exception.\n\n* What went wrong:\nA problem occurred configuring root project \'aBooks\'.\n > Could not resolve all artifacts for configuration \':classpath\'.\n > Could not find com.android.tools.build:gradle:7.1.1.\n Searched in the following locations:\n - \nhttps://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.1.1/gradle-7.1.1.pom\n If the artifact you are trying to retrieve can be found in the repository but without metadata in \'Maven POM\' format, you …Run Code Online (Sandbox Code Playgroud)